ID0 is default for 3POS switch
This commit is contained in:
+1
-1
@@ -708,7 +708,7 @@ void menuProcModel(uint8_t event)
|
|||||||
for (uint8_t i=1; i<7; i++) {
|
for (uint8_t i=1; i<7; i++) {
|
||||||
attr = 0;
|
attr = 0;
|
||||||
if (i == 4) {
|
if (i == 4) {
|
||||||
c = '0'+(states & 0x03)-1;
|
c = '0'+(states & 0x03);
|
||||||
states >>= 2;
|
states >>= 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
+2
-2
@@ -601,7 +601,7 @@ int8_t getMovedSwitch()
|
|||||||
prev = (switches_states & mask);
|
prev = (switches_states & mask);
|
||||||
}
|
}
|
||||||
else if (i <= 6) {
|
else if (i <= 6) {
|
||||||
prev = ((switches_states & 0x18) == ((i-3) << 3));
|
prev = ((switches_states & 0x18) == ((i-4) << 3));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mask = (1<<(i-2));
|
mask = (1<<(i-2));
|
||||||
@@ -614,7 +614,7 @@ int8_t getMovedSwitch()
|
|||||||
if (mask)
|
if (mask)
|
||||||
switches_states ^= mask;
|
switches_states ^= mask;
|
||||||
else
|
else
|
||||||
switches_states = (switches_states & 0xE7) | ((i-3) << 3);
|
switches_states = (switches_states & 0xE7) | ((i-4) << 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user