1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Merge pull request #1720 from TheAngularity/patch-1

flightmodebox only seen if it's defined and activated
This commit is contained in:
borisbstyle 2016-12-02 16:14:48 +01:00 committed by GitHub
commit 01968ff207

View file

@ -284,17 +284,21 @@ void initActiveBoxIds(void)
if (sensors(SENSOR_ACC)) { if (sensors(SENSOR_ACC)) {
activeBoxIds[activeBoxIdCount++] = BOXANGLE; activeBoxIds[activeBoxIdCount++] = BOXANGLE;
activeBoxIds[activeBoxIdCount++] = BOXHORIZON; activeBoxIds[activeBoxIdCount++] = BOXHORIZON;
activeBoxIds[activeBoxIdCount++] = BOXHEADFREE;
} }
#ifdef BARO
if (sensors(SENSOR_BARO)) { if (sensors(SENSOR_BARO)) {
activeBoxIds[activeBoxIdCount++] = BOXBARO; activeBoxIds[activeBoxIdCount++] = BOXBARO;
} }
#endif
if (sensors(SENSOR_ACC) || sensors(SENSOR_MAG)) { #ifdef MAG
if (sensors(SENSOR_MAG)) {
activeBoxIds[activeBoxIdCount++] = BOXMAG; activeBoxIds[activeBoxIdCount++] = BOXMAG;
activeBoxIds[activeBoxIdCount++] = BOXHEADFREE;
activeBoxIds[activeBoxIdCount++] = BOXHEADADJ; activeBoxIds[activeBoxIdCount++] = BOXHEADADJ;
} }
#endif
#ifdef GPS #ifdef GPS
if (feature(FEATURE_GPS)) { if (feature(FEATURE_GPS)) {