chore: Remove unused LS_FUNC_RANGE, TimersContext (#4267)
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -263,7 +263,6 @@ class LogicalSwitchEditPage : public Page
|
||||
SET_DIRTY();
|
||||
updateLogicalSwitchOneWindow();
|
||||
});
|
||||
functionChoice->setAvailableHandler(isLogicalSwitchFunctionAvailable);
|
||||
|
||||
logicalSwitchOneWindow = new FormWindow(window, rect_t{});
|
||||
updateLogicalSwitchOneWindow();
|
||||
|
||||
@@ -522,24 +522,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)
|
||||
@@ -551,11 +533,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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -3038,7 +3038,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 )
|
||||
|
||||
@@ -210,7 +210,6 @@ enum LogicalSwitchesFunctions {
|
||||
LS_FUNC_VALMOSTEQUAL, // v~=offset
|
||||
LS_FUNC_VPOS, // v>offset
|
||||
LS_FUNC_VNEG, // v<offset
|
||||
LS_FUNC_RANGE,
|
||||
LS_FUNC_APOS, // |v|>offset
|
||||
LS_FUNC_ANEG, // |v|<offset
|
||||
LS_FUNC_AND,
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -133,7 +133,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -141,7 +141,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -141,7 +141,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -131,7 +131,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
@@ -133,7 +133,6 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
|
||||
Reference in New Issue
Block a user