1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

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
This commit is contained in:
ctzsnooze 2023-03-22 00:41:45 +11:00 committed by GitHub
parent 26708ea425
commit d9775287a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View file

@ -495,7 +495,7 @@ void tryArm(void)
const timeUs_t currentTimeUs = micros();
#ifdef USE_DSHOT
if (currentTimeUs - getLastDshotBeaconCommandTimeUs() < DSHOT_BEACON_GUARD_DELAY_US) {
if (cmpTimeUs(currentTimeUs, getLastDshotBeaconCommandTimeUs()) < DSHOT_BEACON_GUARD_DELAY_US) {
if (tryingToArm == ARMING_DELAYED_DISARMED) {
if (IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH)) {
tryingToArm = ARMING_DELAYED_CRASHFLIP;