1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

extra_ledstrip_color

This commit is contained in:
Ivan Efimov 2024-03-20 02:33:46 -05:00 committed by limon.spb
parent da9e2bcaa0
commit 329c02ef84
3 changed files with 10 additions and 1 deletions

View file

@ -79,6 +79,7 @@ typedef enum {
BOXBEEPERMUTE, BOXBEEPERMUTE,
BOXREADY, BOXREADY,
BOXLAPTIMERRESET, BOXLAPTIMERRESET,
BOXLEDNOBLINK,
CHECKBOX_ITEM_COUNT CHECKBOX_ITEM_COUNT
} boxId_e; } boxId_e;

View file

@ -1019,9 +1019,15 @@ static void applyLarsonScannerLayer(bool updateNow, timeUs_t *timer)
// blink twice, then wait ; either always or just when landing // blink twice, then wait ; either always or just when landing
static void applyLedBlinkLayer(bool updateNow, timeUs_t *timer) static void applyLedBlinkLayer(bool updateNow, timeUs_t *timer)
{ {
const uint16_t blinkPattern = ledStripConfig()->extra_ledstrip_blinkmask; uint16_t blinkPattern = ledStripConfig()->extra_ledstrip_blinkmask;
if (IS_RC_MODE_ACTIVE(BOXLEDNOBLINK)) {
blinkPattern = 0xFFFF;
}
static uint16_t blinkMask; static uint16_t blinkMask;
if (updateNow) { if (updateNow) {
blinkMask = blinkMask >> 1; blinkMask = blinkMask >> 1;
if (blinkMask <= 1) if (blinkMask <= 1)

View file

@ -102,6 +102,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT] = {
{ .boxId = BOXBEEPERMUTE, .boxName = "BEEPER MUTE", .permanentId = 52}, { .boxId = BOXBEEPERMUTE, .boxName = "BEEPER MUTE", .permanentId = 52},
{ .boxId = BOXREADY, .boxName = "READY", .permanentId = 53}, { .boxId = BOXREADY, .boxName = "READY", .permanentId = 53},
{ .boxId = BOXLAPTIMERRESET, .boxName = "LAP TIMER RESET", .permanentId = 54}, { .boxId = BOXLAPTIMERRESET, .boxName = "LAP TIMER RESET", .permanentId = 54},
{ .boxId = BOXLEDNOBLINK, .boxName = "LED NO BLINK", .permanentId = 101},
}; };
// mask of enabled IDs, calculated on startup based on enabled features. boxId_e is used as bit index // mask of enabled IDs, calculated on startup based on enabled features. boxId_e is used as bit index
@ -338,6 +339,7 @@ void initActiveBoxIds(void)
BME(BOXSTICKCOMMANDDISABLE); BME(BOXSTICKCOMMANDDISABLE);
BME(BOXREADY); BME(BOXREADY);
BME(BOXLEDNOBLINK);
#if defined(USE_GPS_LAP_TIMER) #if defined(USE_GPS_LAP_TIMER)
BME(BOXLAPTIMERRESET); BME(BOXLAPTIMERRESET);