mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
LED on/off add via LEDLOW mode
This commit is contained in:
parent
0da650b5bd
commit
aede4037cf
2 changed files with 16 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue