diff --git a/companion/src/firmwares/rawswitch.h b/companion/src/firmwares/rawswitch.h index 2054eb7edc6..4943cc3d49b 100644 --- a/companion/src/firmwares/rawswitch.h +++ b/companion/src/firmwares/rawswitch.h @@ -60,10 +60,9 @@ class RawSwitch { LogicalSwitchesContext = 0x01, SpecialFunctionsContext = 0x02, GlobalFunctionsContext = 0x04, - TimersContext = 0x08, - MixesContext = 0x10, + MixesContext = 0x08, - AllModelContexts = SpecialFunctionsContext | LogicalSwitchesContext | TimersContext | MixesContext, + AllModelContexts = SpecialFunctionsContext | LogicalSwitchesContext | MixesContext, AllSwitchContexts = AllModelContexts | GlobalFunctionsContext }; diff --git a/radio/src/gui/128x64/model_logical_switches.cpp b/radio/src/gui/128x64/model_logical_switches.cpp index 08ad19270f9..bf70da064d5 100644 --- a/radio/src/gui/128x64/model_logical_switches.cpp +++ b/radio/src/gui/128x64/model_logical_switches.cpp @@ -81,7 +81,7 @@ void menuModelLogicalSwitchOne(event_t event) lcdDrawTextAlignedLeft(y, STR_FUNC); lcdDrawTextAtIndex(CSWONE_2ND_COLUMN, y, STR_VCSWFUNC, cs->func, attr); if (attr) { - cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL, isLogicalSwitchFunctionAvailable); + cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL); uint8_t new_cstate = lswFamily(cs->func); if (cstate != new_cstate) { if (new_cstate == LS_FAMILY_TIMER) { diff --git a/radio/src/gui/212x64/model_logical_switches.cpp b/radio/src/gui/212x64/model_logical_switches.cpp index 21cceeed5f9..35b6e6e2545 100644 --- a/radio/src/gui/212x64/model_logical_switches.cpp +++ b/radio/src/gui/212x64/model_logical_switches.cpp @@ -207,7 +207,7 @@ void menuModelLogicalSwitches(event_t event) switch (horz) { case LS_FIELD_FUNCTION: { - cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL, isLogicalSwitchFunctionAvailable); + cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL); uint8_t new_cstate = lswFamily(cs->func); if (cstate != new_cstate) { unsigned int save_func = cs->func; diff --git a/radio/src/gui/colorlcd/model_logical_switches.cpp b/radio/src/gui/colorlcd/model_logical_switches.cpp index eeea054919c..68de66052f7 100644 --- a/radio/src/gui/colorlcd/model_logical_switches.cpp +++ b/radio/src/gui/colorlcd/model_logical_switches.cpp @@ -263,7 +263,6 @@ class LogicalSwitchEditPage : public Page SET_DIRTY(); updateLogicalSwitchOneWindow(); }); - functionChoice->setAvailableHandler(isLogicalSwitchFunctionAvailable); logicalSwitchOneWindow = new FormWindow(window, rect_t{}); updateLogicalSwitchOneWindow(); diff --git a/radio/src/gui/gui_common.cpp b/radio/src/gui/gui_common.cpp index 5f784b6a488..b8b11527b22 100644 --- a/radio/src/gui/gui_common.cpp +++ b/radio/src/gui/gui_common.cpp @@ -534,24 +534,6 @@ bool isSwitch2POSWarningStateAvailable(int state) } #endif // #if defined(COLORLCD) -//bool isSwitchAvailableInTimers(int swtch) -//{ -// if (swtch >= 0) { -// if (swtch < TMRMODE_COUNT) -// return true; -// else -// swtch -= TMRMODE_COUNT-1; -// } -// else { -// if (swtch > -TMRMODE_COUNT) -// return false; -// else -// swtch += TMRMODE_COUNT-1; -// } -// -// return isSwitchAvailable(swtch, TimersContext); -//} - bool isThrottleSourceAvailable(int src) { #if !defined(LIBOPENUI) @@ -563,11 +545,6 @@ bool isThrottleSourceAvailable(int src) ((src >= MIXSRC_FIRST_CH) && (src <= MIXSRC_LAST_CH))); } -bool isLogicalSwitchFunctionAvailable(int function) -{ - return function != LS_FUNC_RANGE; -} - bool isAssignableFunctionAvailable(int function, CustomFunctionData * functions) { #if defined(OVERRIDE_CHANNEL_FUNCTION) || defined(GVARS) diff --git a/radio/src/gui/gui_common.h b/radio/src/gui/gui_common.h index 8bfd49e7910..c96e314a2c2 100644 --- a/radio/src/gui/gui_common.h +++ b/radio/src/gui/gui_common.h @@ -64,7 +64,6 @@ enum SwitchContext LogicalSwitchesContext, ModelCustomFunctionsContext, GeneralCustomFunctionsContext, - TimersContext, MixesContext }; @@ -74,7 +73,6 @@ int getFirstAvailable(int min, int max, IsValueAvailable isValueAvailable); bool isInputAvailable(int input); bool isSourceAvailableInInputs(int source); bool isThrottleSourceAvailable(int source); -bool isLogicalSwitchFunctionAvailable(int function); bool isLogicalSwitchAvailable(int index); bool isAssignableFunctionAvailable(int function); bool isSourceAvailable(int source); @@ -89,7 +87,6 @@ int hasSerialMode(int mode); bool isSwitchAvailableInLogicalSwitches(int swtch); bool isSwitchAvailableInCustomFunctions(int swtch); bool isSwitchAvailableInMixes(int swtch); -bool isSwitchAvailableInTimers(int swtch); bool isPxx2IsrmChannelsCountAllowed(int channels); bool isModuleUsingSport(uint8_t moduleBay, uint8_t moduleType); bool isTrainerUsingModuleBay(); diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 83cec454ca8..45c23dbab1e 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -3037,7 +3037,6 @@ LROT_BEGIN(etxcst, NULL, 0) LROT_NUMENTRY( LS_FUNC_VALMOSTEQUAL, LS_FUNC_VALMOSTEQUAL ) LROT_NUMENTRY( LS_FUNC_VPOS, LS_FUNC_VPOS ) LROT_NUMENTRY( LS_FUNC_VNEG, LS_FUNC_VNEG ) - LROT_NUMENTRY( LS_FUNC_RANGE, LS_FUNC_RANGE ) LROT_NUMENTRY( LS_FUNC_APOS, LS_FUNC_APOS ) LROT_NUMENTRY( LS_FUNC_ANEG, LS_FUNC_ANEG ) LROT_NUMENTRY( LS_FUNC_AND, LS_FUNC_AND ) diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index f68d61e0e56..e4179a59288 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -208,7 +208,6 @@ enum LogicalSwitchesFunctions { LS_FUNC_VALMOSTEQUAL, // v~=offset LS_FUNC_VPOS, // v>offset LS_FUNC_VNEG, // voffset LS_FUNC_ANEG, // |v|