1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00

New feature 'Beeper Mute'

Added comma in the last element of struct

Removed BOXBEEPERON from condition
This commit is contained in:
Davor Kustec 2020-10-01 16:19:42 +02:00
parent 8e9e533305
commit 4b9ac000ec
3 changed files with 5 additions and 2 deletions

View file

@ -76,6 +76,7 @@ typedef enum {
BOXLAUNCHCONTROL, BOXLAUNCHCONTROL,
BOXMSPOVERRIDE, BOXMSPOVERRIDE,
BOXSTICKCOMMANDDISABLE, BOXSTICKCOMMANDDISABLE,
BOXBEEPERMUTE,
CHECKBOX_ITEM_COUNT CHECKBOX_ITEM_COUNT
} boxId_e; } boxId_e;

View file

@ -241,7 +241,7 @@ void beeper(beeperMode_e mode)
mode == BEEPER_SILENCE || ( mode == BEEPER_SILENCE || (
(beeperConfig()->beeper_off_flags & BEEPER_GET_FLAG(BEEPER_USB)) (beeperConfig()->beeper_off_flags & BEEPER_GET_FLAG(BEEPER_USB))
&& getBatteryState() == BATTERY_NOT_PRESENT && getBatteryState() == BATTERY_NOT_PRESENT
) ) || IS_RC_MODE_ACTIVE(BOXBEEPERMUTE)
) { ) {
beeperSilence(); beeperSilence();
return; return;

View file

@ -98,7 +98,8 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT] = {
{ BOXVTXCONTROLDISABLE, "VTX CONTROL DISABLE", 48}, { BOXVTXCONTROLDISABLE, "VTX CONTROL DISABLE", 48},
{ BOXLAUNCHCONTROL, "LAUNCH CONTROL", 49 }, { BOXLAUNCHCONTROL, "LAUNCH CONTROL", 49 },
{ BOXMSPOVERRIDE, "MSP OVERRIDE", 50}, { BOXMSPOVERRIDE, "MSP OVERRIDE", 50},
{ BOXSTICKCOMMANDDISABLE, "STICK COMMANDS DISABLE", 51} { BOXSTICKCOMMANDDISABLE, "STICK COMMANDS DISABLE", 51},
{ BOXBEEPERMUTE, "BEEPER MUTE", 52},
}; };
// mask of enabled IDs, calculated on startup based on enabled features. boxId_e is used as bit index // mask of enabled IDs, calculated on startup based on enabled features. boxId_e is used as bit index
@ -230,6 +231,7 @@ void initActiveBoxIds(void)
} }
BME(BOXBEEPERON); BME(BOXBEEPERON);
BME(BOXBEEPERMUTE);
#ifdef USE_LED_STRIP #ifdef USE_LED_STRIP
if (featureIsEnabled(FEATURE_LED_STRIP)) { if (featureIsEnabled(FEATURE_LED_STRIP)) {