1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00
Commit graph

23 commits

Author SHA1 Message Date
Steve Evans
dd0a37b41c
Only wait for ESC to recognise DSHOT signal once at startup (#14408)
* Only wait for ESC to recognise DSHOT signal once at startup

* Use cmpTimeMs to compare time expressed in ms
2025-05-28 03:02:24 +10:00
Jay Blackman
c2768d0409
Refactoring motor to simplify implementation on other platforms (#14156) 2025-01-24 18:37:20 +11:00
ke deng
d5f899156d
Fixes #13930: fix timer based bidirectional dshot command not working issue (#13978)
* fix timer based bidirectional dshot command not working issue

* smaller scope of isBitbangActive
2024-10-22 16:13:06 +02:00
Steve Evans
2af7337204
Call updateInit() before writing motor command data (#12865) 2023-06-14 00:09:51 +02:00
Steve Evans
e8126dd6dd
Send motor data and then immediately decode prior telemetry data for bitbanged DSHOT (#12685)
* Send motor data and then immediately decode prior telemetry data for bitbanged DSHOT
F4 can't handle 8K PID loop

* Fix missing cfg_pms.version

* Limit G4 to 4K PID rate as per F4
2023-04-19 13:05:46 +02:00
ctzsnooze
d9775287a2
Keep sending DShot 0 packets between beacon commands (#12544)
* Keep sending DShot zero between beacon commands

And don't wait 100ms between inline commands, which the beacon commands are.

* use cmpTimeUs for time comparisons

* Fixed intervals between DShot beacons

* fix indentnation, thanks KarateBrot
2023-03-21 14:41:45 +01:00
KarateBrot
ddf1d46549 Remove old style definitions 2022-10-13 03:33:54 +02:00
J Blackman
8d909fbe99
Merge pull request #11810 from DusKing1/switch-case-cleanup
Cleanup some switch-case-s
2022-09-19 09:05:31 +10:00
danmos
21b3fc15b7 Extended Bidir DShot
Extended DSHOT telemetry
Fixed broken unit testing

Rebased to master

Extended DSHOT telemetry

Added DSHOT ESC fail to OSD warnings

Initial extended DSHOT implementation

DSHOT telemetry ranges readjusted

Added shot_telemetry_data to cli

Added DSHOT telemetry warnings

Added extended DSHOT telemetry temperature data to osd elements

Fixed DSHOT telemetry osd warnings

Make cli dshot telemetry types human readable

Fixed ESC temperature OSD element

Added extended dshot telemetry enable command to dshot command queue to enable it in tryArm function.

Fixed broken automated unit testing

Fixed text output for dshot_telemetry_data cli command

Decode extended telemetry only when it has been activated in the ESC

DSHOT extended telemetry is only enabled when an extended telemetry enable frame is being processed

Fixed broken automated unit testing

Update tail's dshot command in queue when running blocking commands, so extended dshot telemetry command responses can be associated to their corresponding extended dshot telemetry enable/disable command request

Added clariffication to dshot_get_telemetry_type_to_decode to explain mechanish used for processing DSHOT_CMD_EXTENDED_TELEMETRY_ENABLE response

Tabs cleanup
Added dshot motor stop fix when writting blocking commands

Added extended DSHOT telemetry to osd warnings
Fixed extended DSHOT telemetry in osd elements

Implemented msp extended dshot telemetry
Optimized osd warnings

Fixed code style

Added max temp to osd stats

Fixed automated unit testing

Fixed broken automated unit testing

Fixed missing extended dshot telemetry voltage and wrong current
Fixed unadverted change in gitignore file

Print esc number besides max esc tempetature in osd stats

issues and some other minor issues

ESC temperature is coded as an uint8 going from 0 to 255. Updated osd config esc_temp_alarm from int8_t to uint8_t to match esc temperature coding

issues and some other minor issues

Enable extended dshot telemetry when no esc sensors avaliable and dshot telemetry is enabled

Arranged dshot.h header and removed unnecessary headers from dshot.c

Updated dshot_telemetry_data cli command output

Fixed dshot_telemetry_data command

motor_output_unittest fixed

Fixed motor number printing in dshot_telemetry_data cli command

fixed motor_output_unittest

Merged dshot_telemetry_data into dshot_telemetry_info cli command

Fixed tabs

Fixed motor_output_unittest

Support extended DSHOT telemetry on DJI FPV

Fixed Compiling fails without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY defines.

Fixed whencompiling without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY

Reworked so code can be compiled with USE_ESC_SENSOR and USE_DSHOT_TELEMETRY separately

Enabling EDT the correct way

Removed unecessary conversions

Changed motorIndex datatype to uint8_t in dshot functions
2022-09-14 20:11:58 +02:00
Hugo Chiang
0088eb5f21 switch case cleanup
Co-Authored-By: Petr Ledvina <ledvinap@gmail.com>
Co-Authored-By: haslinghuis <mark@numloq.nl>
2022-08-30 07:04:55 +08:00
RoarFPV
6a7d2c3788 Make sure to write dshot stop cmd to all other motors when targeting less than max motor count 2022-06-17 20:53:01 -07:00
DusKing1
73c87c0593 fix typos in code comments in common folder 2021-08-16 15:06:07 +08:00
Michael Keller
4d9f2c330b
Merge pull request #10406 from mikeller/fix_bitbanged_dshot_commands
Fixed problem when sending blocking Dshot commands with bitbanged Dshot enabled.
2020-12-26 02:32:52 +01:00
Michael Keller
bfa5cc1cd4 Fixed problem when sending blocking Dshot commands with bitbanged Dshot enabled. 2020-12-15 02:29:39 +01:00
Michael Keller
98b634adcd Removed deprecated Dshot commands to enable / disable bidirectional Dshot. 2020-12-12 21:35:29 +01:00
mikeller
c2812eca8c Refactored Dshot enabled checks. 2020-06-22 10:04:43 +12:00
Bruce Luckcuck
c6c9ba7229 Fix blocking DSHOT commands
Motor and DSHOT refactoring broke blocking DSHOT commands as the check for commands being enabled was not taking into account that "blocking" type commands need to operate only when the motors are not enabled.

Fixes the CLI `dshotprog` command.
2020-04-17 08:29:24 -04:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Bruce Luckcuck
5a9ce05ec0 Prevent DSHOT commands during protocol initialization/detection
Adds a fixed delay after the motors are enabled before DSHOT commands can be sent. Fixes a problem caused by sending DSHOT commands too soon and prevent the ESC from properly detecting the protocol.
2019-09-21 18:26:05 -04:00
warhog
7b9114d0d8 removed UNUSED macro for motorCount as motorCount is used in line 213 since commit ccf7ce964a 2019-09-15 21:11:10 +02:00
Thorsten Laux
ccf7ce964a use driver independent motor count 2019-09-06 16:43:57 +02:00
jflyper
bb8e0686c1 Rename overlooked Dshot command function name 2019-08-13 16:27:34 +09:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00