diff --git a/src/main/interface/settings.c b/src/main/interface/settings.c index f46dc13b25..07419e291d 100644 --- a/src/main/interface/settings.c +++ b/src/main/interface/settings.c @@ -630,6 +630,7 @@ const clivalue_t valueTable[] = { // PG_BEEPER_CONFIG #ifdef USE_DSHOT { "beeper_dshot_beacon_tone", VAR_UINT8 | MASTER_VALUE, .config.minmax = {0, DSHOT_CMD_BEACON5 }, PG_BEEPER_CONFIG, offsetof(beeperConfig_t, dshotBeaconTone) }, + { "disable_rx_loss_dshot_beacon", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_BEEPER_CONFIG, offsetof(beeperConfig_t, disableRxLossDshotBeacon) }, #endif #endif diff --git a/src/main/io/beeper.c b/src/main/io/beeper.c index 2a8a30cc7a..bf121c83c5 100644 --- a/src/main/io/beeper.c +++ b/src/main/io/beeper.c @@ -392,7 +392,7 @@ void beeperUpdate(timeUs_t currentTimeUs) beeperIsOn = 1; #ifdef USE_DSHOT - if (!areMotorsRunning() && beeperConfig()->dshotBeaconTone && (beeperConfig()->dshotBeaconTone <= DSHOT_CMD_BEACON5) && (currentBeeperEntry->mode == BEEPER_RX_SET || currentBeeperEntry->mode == BEEPER_RX_LOST)) { + if (!areMotorsRunning() && beeperConfig()->dshotBeaconTone && (beeperConfig()->dshotBeaconTone <= DSHOT_CMD_BEACON5) && (currentBeeperEntry->mode == BEEPER_RX_SET || (beeperConfig()->disableRxLossDshotBeacon && currentBeeperEntry->mode == BEEPER_RX_LOST))) { pwmDisableMotors(); delay(1); diff --git a/src/main/pg/beeper.c b/src/main/pg/beeper.c index ab6e66cc51..56e561b310 100644 --- a/src/main/pg/beeper.c +++ b/src/main/pg/beeper.c @@ -28,7 +28,9 @@ #include "beeper.h" PG_REGISTER_WITH_RESET_TEMPLATE(beeperConfig_t, beeperConfig, PG_BEEPER_CONFIG, 1); + PG_RESET_TEMPLATE(beeperConfig_t, beeperConfig, - .dshotBeaconTone = 0 + .dshotBeaconTone = 0, + .disableRxLossDshotBeacon = false, ); #endif diff --git a/src/main/pg/beeper.h b/src/main/pg/beeper.h index 3fba96c252..ada84b429a 100644 --- a/src/main/pg/beeper.h +++ b/src/main/pg/beeper.h @@ -27,6 +27,7 @@ typedef struct beeperConfig_s { uint32_t beeper_off_flags; uint32_t preferred_beeper_off_flags; uint8_t dshotBeaconTone; + uint8_t disableRxLossDshotBeacon; } beeperConfig_t; PG_DECLARE(beeperConfig_t, beeperConfig);