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
1 changed files with 6 additions and 2 deletions

View File

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