From 2854bbbecd30fea11d9534b96f3281ba07ef6c8b Mon Sep 17 00:00:00 2001 From: TheAngularity Date: Thu, 1 Dec 2016 16:02:01 +0100 Subject: [PATCH 1/2] 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 6def30125..7e305b91e 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)) { From 6f43494a7734b49fdd0609ca55a6695f3ef7a39e Mon Sep 17 00:00:00 2001 From: TheAngularity Date: Thu, 1 Dec 2016 16:52:35 +0100 Subject: [PATCH 2/2] Update fc_msp.c --- src/main/fc/fc_msp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 7e305b91e..9e540a5ea 100755 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -284,6 +284,7 @@ void initActiveBoxIds(void) if (sensors(SENSOR_ACC)) { activeBoxIds[activeBoxIdCount++] = BOXANGLE; activeBoxIds[activeBoxIdCount++] = BOXHORIZON; + activeBoxIds[activeBoxIdCount++] = BOXHEADFREE; } #ifdef BARO @@ -293,9 +294,8 @@ void initActiveBoxIds(void) #endif #ifdef MAG - if (sensors(SENSOR_ACC) || sensors(SENSOR_MAG)) { + if (sensors(SENSOR_MAG)) { activeBoxIds[activeBoxIdCount++] = BOXMAG; - activeBoxIds[activeBoxIdCount++] = BOXHEADFREE; activeBoxIds[activeBoxIdCount++] = BOXHEADADJ; } #endif