1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

flightmodebox only seen if it's defined and activated

This commit is contained in:
TheAngularity 2016-12-01 16:02:01 +01:00 committed by GitHub
parent 8af1508c83
commit 2854bbbecd

View file

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