diff --git a/src/main/fc/fc_msp_box.c b/src/main/fc/fc_msp_box.c index bc7e9e8d29..3491381cff 100644 --- a/src/main/fc/fc_msp_box.c +++ b/src/main/fc/fc_msp_box.c @@ -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++) { diff --git a/src/main/fc/rc_modes.h b/src/main/fc/rc_modes.h index 02cf1a5997..79dbdd79d8 100755 --- a/src/main/fc/rc_modes.h +++ b/src/main/fc/rc_modes.h @@ -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; @@ -115,4 +114,4 @@ bool isRangeActive(uint8_t auxChannelIndex, const channelRange_t *range); void updateActivatedModes(void); void updateUsedModeActivationConditionFlags(void); -void configureModeActivationCondition(int macIndex, boxId_e modeId, uint8_t auxChannelIndex, uint16_t startPwm, uint16_t endPwm); \ No newline at end of file +void configureModeActivationCondition(int macIndex, boxId_e modeId, uint8_t auxChannelIndex, uint16_t startPwm, uint16_t endPwm);