Don't remove 2POS from avail switches for invert

Also prevent 'unused variable' compiler warning that results from change
Resolves #178
This commit is contained in:
Peter Feerick
2021-08-27 22:19:32 +10:00
parent 8becbfcb49
commit a4f781ad1f
+1 -3
View File
@@ -298,6 +298,7 @@ bool isLogicalSwitchAvailable(int index)
bool isSwitchAvailable(int swtch, SwitchContext context)
{
bool negative = false;
(void)negative;
if (swtch < 0) {
if (swtch == -SWSRC_ON || swtch == -SWSRC_ONE) {
@@ -319,9 +320,6 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
return false;
}
if (!IS_CONFIG_3POS(swinfo.quot)) {
if (negative) {
return false;
}
if (swinfo.rem == 1) {
// mid position not available for 2POS switches
return false;