From 329c02ef84d0397a5f2e68f61adb9c0b69c11392 Mon Sep 17 00:00:00 2001 From: Ivan Efimov Date: Wed, 20 Mar 2024 02:33:46 -0500 Subject: [PATCH] extra_ledstrip_color --- src/main/fc/rc_modes.h | 1 + src/main/io/ledstrip.c | 8 +++++++- src/main/msp/msp_box.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/fc/rc_modes.h b/src/main/fc/rc_modes.h index 0b8e2d36b5..5d141631b4 100644 --- a/src/main/fc/rc_modes.h +++ b/src/main/fc/rc_modes.h @@ -79,6 +79,7 @@ typedef enum { BOXBEEPERMUTE, BOXREADY, BOXLAPTIMERRESET, + BOXLEDNOBLINK, CHECKBOX_ITEM_COUNT } boxId_e; diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 07668f311c..7d82ce793e 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -1019,9 +1019,15 @@ static void applyLarsonScannerLayer(bool updateNow, timeUs_t *timer) // blink twice, then wait ; either always or just when landing 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; + if (updateNow) { blinkMask = blinkMask >> 1; if (blinkMask <= 1) diff --git a/src/main/msp/msp_box.c b/src/main/msp/msp_box.c index 0fe27fd3bc..69def00ece 100644 --- a/src/main/msp/msp_box.c +++ b/src/main/msp/msp_box.c @@ -102,6 +102,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT] = { { .boxId = BOXBEEPERMUTE, .boxName = "BEEPER MUTE", .permanentId = 52}, { .boxId = BOXREADY, .boxName = "READY", .permanentId = 53}, { .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 @@ -338,6 +339,7 @@ void initActiveBoxIds(void) BME(BOXSTICKCOMMANDDISABLE); BME(BOXREADY); + BME(BOXLEDNOBLINK); #if defined(USE_GPS_LAP_TIMER) BME(BOXLAPTIMERRESET);