1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Replace profile.activate and rcOptions with

profile.modeActivationCondition and rcModeActivationMask.

Implementation of using and setting modeActivationConditions is missing.
This commit is contained in:
Dominic Clifton 2014-10-12 10:38:04 +01:00
parent 6f4ef82f7d
commit c0fd0c1f33
11 changed files with 119 additions and 108 deletions

View file

@ -68,7 +68,7 @@ void beepcodeUpdateState(bool warn_vbat)
static failsafeBeeperWarnings_e warn_failsafe = FAILSAFE_IDLE;
//===================== BeeperOn via rcOptions =====================
if (rcOptions[BOXBEEPERON]) { // unconditional beeper on via AUXn switch
if (IS_RC_MODE_ACTIVE(BOXBEEPERON)) { // unconditional beeper on via AUXn switch
beeperOnBox = 1;
} else {
beeperOnBox = 0;
@ -95,7 +95,7 @@ void beepcodeUpdateState(bool warn_vbat)
#ifdef GPS
//===================== GPS fix notification handling =====================
if (sensors(SENSOR_GPS)) {
if ((rcOptions[BOXGPSHOME] || rcOptions[BOXGPSHOLD]) && !STATE(GPS_FIX)) { // if no fix and gps funtion is activated: do warning beeps
if ((IS_RC_MODE_ACTIVE(BOXGPSHOME) || IS_RC_MODE_ACTIVE(BOXGPSHOLD)) && !STATE(GPS_FIX)) { // if no fix and gps funtion is activated: do warning beeps
warn_noGPSfix = 1;
} else {
warn_noGPSfix = 0;