Refactoring putsSwitches
Will simplify things when we have 64 logical switches ...
This commit is contained in:
@@ -203,7 +203,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
|
||||
|
||||
if (swtch < 0) {
|
||||
negative = true;
|
||||
if (swtch == -SWSRC_ON || swtch == -SWSRC_One) {
|
||||
if (swtch == -SWSRC_ON || swtch == -SWSRC_ONE) {
|
||||
return false;
|
||||
}
|
||||
swtch = -swtch;
|
||||
@@ -245,7 +245,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
|
||||
}
|
||||
}
|
||||
|
||||
if (context != ModelCustomFunctionsContext && context != GeneralCustomFunctionsContext && (swtch == SWSRC_ON || swtch == SWSRC_One)) {
|
||||
if (context != ModelCustomFunctionsContext && context != GeneralCustomFunctionsContext && (swtch == SWSRC_ON || swtch == SWSRC_ONE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user