LED on/off add via LEDLOW mode
This commit is contained in:
parent
0da650b5bd
commit
aede4037cf
|
@ -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();
|
||||
|
|
|
@ -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 |
|
||||
|
|
Loading…
Reference in New Issue