Merge pull request #1720 from TheAngularity/patch-1
flightmodebox only seen if it's defined and activated
This commit is contained in:
commit
01968ff207
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue