mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Merge pull request #4360 from mikeller/fix_dshot_beacon_frequency
Changed Dshot beacon to not activate when beeper is turned off.
This commit is contained in:
commit
2e05656104
1 changed files with 12 additions and 11 deletions
|
@ -364,19 +364,20 @@ void beeperUpdate(timeUs_t currentTimeUs)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
if (!areMotorsRunning() && beeperConfig()->dshotBeaconTone && (beeperConfig()->dshotBeaconTone <= DSHOT_CMD_BEACON5) && (currentBeeperEntry->mode == BEEPER_RX_SET || currentBeeperEntry->mode == BEEPER_RX_LOST)) {
|
||||
pwmDisableMotors();
|
||||
delay(1);
|
||||
|
||||
pwmWriteDshotCommand(ALL_MOTORS, getMotorCount(), beeperConfig()->dshotBeaconTone);
|
||||
|
||||
pwmEnableMotors();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!beeperIsOn) {
|
||||
beeperIsOn = 1;
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
if (!areMotorsRunning() && beeperConfig()->dshotBeaconTone && (beeperConfig()->dshotBeaconTone <= DSHOT_CMD_BEACON5) && (currentBeeperEntry->mode == BEEPER_RX_SET || currentBeeperEntry->mode == BEEPER_RX_LOST)) {
|
||||
pwmDisableMotors();
|
||||
delay(1);
|
||||
|
||||
pwmWriteDshotCommand(ALL_MOTORS, getMotorCount(), beeperConfig()->dshotBeaconTone);
|
||||
|
||||
pwmEnableMotors();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (currentBeeperEntry->sequence[beeperPos] != 0) {
|
||||
if (!(getBeeperOffMask() & (1 << (currentBeeperEntry->mode - 1))))
|
||||
BEEP_ON;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue