From 2854bbbecd30fea11d9534b96f3281ba07ef6c8b Mon Sep 17 00:00:00 2001 From: TheAngularity Date: Thu, 1 Dec 2016 16:02:01 +0100 Subject: [PATCH] flightmodebox only seen if it's defined and activated --- src/main/fc/fc_msp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 6def301254..7e305b91e8 100755 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -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)) {