diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 1eb4ab2ba..aaaf228bd 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -48,6 +48,7 @@ #include "io/ledstrip.h" static bool ledStripInitialised = false; +static bool ledStripIsOnFlag = true; static failsafe_t* failsafe; //#define USE_LED_ANIMATION @@ -742,8 +743,13 @@ void updateLedStrip(void) } if ( IS_RC_MODE_ACTIVE(BOXLEDLOW)){ + if (ledStripIsOnFlag){ ledStripDisable(); - return; + ledStripIsOnFlag = false; + } + return; + }else{ + ledStripIsOnFlag = true; } uint32_t now = micros(); diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index e7b1d1a43..9d25c6415 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -617,6 +617,14 @@ void mspInit(serialConfig_t *serialConfig) activeBoxIds[activeBoxIdCount++] = BOXBEEPERON; +#ifdef LED_STRIP + if (feature(FEATURE_LED_STRIP)) { + //activeBoxIds[activeBoxIdCount++] = BOXLEDMAX; + activeBoxIds[activeBoxIdCount++] = BOXLEDLOW; + //activeBoxIds[activeBoxIdCount++] = BOXLLIGHTS; + } +#endif + if (feature(FEATURE_INFLIGHT_ACC_CAL)) activeBoxIds[activeBoxIdCount++] = BOXCALIB; @@ -746,6 +754,7 @@ static bool processOutCommand(uint8_t cmdMSP) IS_ENABLED(FLIGHT_MODE(PASSTHRU_MODE)) << BOXPASSTHRU | IS_ENABLED(IS_RC_MODE_ACTIVE(BOXBEEPERON)) << BOXBEEPERON | IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLEDMAX)) << BOXLEDMAX | + IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLEDLOW)) << BOXLEDLOW | IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLLIGHTS)) << BOXLLIGHTS | IS_ENABLED(IS_RC_MODE_ACTIVE(BOXCALIB)) << BOXCALIB | IS_ENABLED(IS_RC_MODE_ACTIVE(BOXGOV)) << BOXGOV |