Issue #192 - Trims and Rotary encoders buttons added to the switches

list
This commit is contained in:
Bertrand Songis
2014-02-06 12:45:53 +01:00
parent 46fe25fd24
commit 4a20329b2b
14 changed files with 178 additions and 108 deletions
+12 -1
View File
@@ -1260,7 +1260,7 @@ bool isInputSourceAvailable(int16_t source)
return false;
}
bool isSwitchAvailable(int16_t swtch)
bool isSwitchAvailableInCustomSwitches(int16_t swtch)
{
if (swtch < 0) {
if (swtch <= -SWSRC_ON)
@@ -1286,6 +1286,15 @@ bool isSwitchAvailable(int16_t swtch)
}
#endif
return true;
}
bool isSwitchAvailable(int16_t swtch)
{
if (!isSwitchAvailableInCustomSwitches(swtch)) {
return false;
}
if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) {
CustomSwData * cs = cswAddress(swtch-SWSRC_FIRST_CSW);
return (cs->func != CS_OFF);
@@ -1293,4 +1302,6 @@ bool isSwitchAvailable(int16_t swtch)
return true;
}
#endif