mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
flightmodebox only seen if it's defined and activated
This commit is contained in:
parent
8af1508c83
commit
2854bbbecd
1 changed files with 4 additions and 0 deletions
|
@ -286,15 +286,19 @@ void initActiveBoxIds(void)
|
||||||
activeBoxIds[activeBoxIdCount++] = BOXHORIZON;
|
activeBoxIds[activeBoxIdCount++] = BOXHORIZON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BARO
|
||||||
if (sensors(SENSOR_BARO)) {
|
if (sensors(SENSOR_BARO)) {
|
||||||
activeBoxIds[activeBoxIdCount++] = BOXBARO;
|
activeBoxIds[activeBoxIdCount++] = BOXBARO;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MAG
|
||||||
if (sensors(SENSOR_ACC) || sensors(SENSOR_MAG)) {
|
if (sensors(SENSOR_ACC) || sensors(SENSOR_MAG)) {
|
||||||
activeBoxIds[activeBoxIdCount++] = BOXMAG;
|
activeBoxIds[activeBoxIdCount++] = BOXMAG;
|
||||||
activeBoxIds[activeBoxIdCount++] = BOXHEADFREE;
|
activeBoxIds[activeBoxIdCount++] = BOXHEADFREE;
|
||||||
activeBoxIds[activeBoxIdCount++] = BOXHEADADJ;
|
activeBoxIds[activeBoxIdCount++] = BOXHEADADJ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GPS
|
#ifdef GPS
|
||||||
if (feature(FEATURE_GPS)) {
|
if (feature(FEATURE_GPS)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue