mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
digital lights control: use old unused BOXLLIGHTS id
This commit is contained in:
parent
3e368d9bf8
commit
bd7fc77676
2 changed files with 8 additions and 10 deletions
|
@ -50,7 +50,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT + 1] = {
|
|||
{ BOXPASSTHRU, "PASSTHRU;", 12 },
|
||||
{ BOXBEEPERON, "BEEPER;", 13 },
|
||||
{ BOXLEDLOW, "LEDLOW;", 15 },
|
||||
{ BOXLLIGHTS, "LLIGHTS;", 16 },
|
||||
{ BOXLIGHTS, "LIGHTS;", 16 },
|
||||
{ BOXOSD, "OSD SW;", 19 },
|
||||
{ BOXTELEMETRY, "TELEMETRY;", 20 },
|
||||
{ BOXAUTOTUNE, "AUTO TUNE;", 21 },
|
||||
|
@ -70,7 +70,6 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT + 1] = {
|
|||
{ BOXCAMERA1, "CAMERA CONTROL 1;", 39 },
|
||||
{ BOXCAMERA2, "CAMERA CONTROL 2;", 40 },
|
||||
{ BOXCAMERA3, "CAMERA CONTROL 3;", 41 },
|
||||
{ BOXLIGHTS, "LIGHTS;", 42 },
|
||||
{ CHECKBOX_ITEM_COUNT, NULL, 0xFF }
|
||||
};
|
||||
|
||||
|
@ -207,6 +206,10 @@ void initActiveBoxIds(void)
|
|||
|
||||
activeBoxIds[activeBoxIdCount++] = BOXBEEPERON;
|
||||
|
||||
#ifdef LIGHTS
|
||||
activeBoxIds[activeBoxIdCount++] = BOXLIGHTS;
|
||||
#endif
|
||||
|
||||
#ifdef USE_LED_STRIP
|
||||
if (feature(FEATURE_LED_STRIP)) {
|
||||
activeBoxIds[activeBoxIdCount++] = BOXLEDLOW;
|
||||
|
@ -234,9 +237,6 @@ void initActiveBoxIds(void)
|
|||
activeBoxIds[activeBoxIdCount++] = BOXCAMERA2;
|
||||
activeBoxIds[activeBoxIdCount++] = BOXCAMERA3;
|
||||
#endif
|
||||
#ifdef LIGHTS
|
||||
activeBoxIds[activeBoxIdCount++] = BOXLIGHTS;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define IS_ENABLED(mask) (mask == 0 ? 0 : 1)
|
||||
|
@ -259,7 +259,7 @@ void packBoxModeFlags(boxBitmask_t * mspBoxModeFlags)
|
|||
CHECK_ACTIVE_BOX(IS_ENABLED(FLIGHT_MODE(PASSTHRU_MODE)), BOXPASSTHRU);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXBEEPERON)), BOXBEEPERON);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLEDLOW)), BOXLEDLOW);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLLIGHTS)), BOXLLIGHTS);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLIGHTS)), BOXLIGHTS);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXOSD)), BOXOSD);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXTELEMETRY)), BOXTELEMETRY);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(ARMING_FLAG(ARMED)), BOXARM);
|
||||
|
@ -283,7 +283,6 @@ void packBoxModeFlags(boxBitmask_t * mspBoxModeFlags)
|
|||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXAUTOTRIM)), BOXAUTOTRIM);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXKILLSWITCH)), BOXKILLSWITCH);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXHOMERESET)), BOXHOMERESET);
|
||||
CHECK_ACTIVE_BOX(IS_ENABLED(IS_RC_MODE_ACTIVE(BOXLIGHTS)), BOXLIGHTS);
|
||||
|
||||
memset(mspBoxModeFlags, 0, sizeof(boxBitmask_t));
|
||||
for (uint32_t i = 0; i < activeBoxIdCount; i++) {
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef enum {
|
|||
BOXPASSTHRU = 10,
|
||||
BOXBEEPERON = 11,
|
||||
BOXLEDLOW = 12,
|
||||
BOXLLIGHTS = 13,
|
||||
BOXLIGHTS = 13,
|
||||
BOXNAVLAUNCH = 14,
|
||||
BOXOSD = 15,
|
||||
BOXTELEMETRY = 16,
|
||||
|
@ -56,7 +56,6 @@ typedef enum {
|
|||
BOXCAMERA1 = 29,
|
||||
BOXCAMERA2 = 30,
|
||||
BOXCAMERA3 = 31,
|
||||
BOXLIGHTS = 32,
|
||||
CHECKBOX_ITEM_COUNT
|
||||
} boxId_e;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue