ID0 is default for 3POS switch

This commit is contained in:
bsongis
2012-05-20 01:00:22 +00:00
parent 02f135a596
commit bb871ce6cf
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -601,7 +601,7 @@ int8_t getMovedSwitch()
prev = (switches_states & mask);
}
else if (i <= 6) {
prev = ((switches_states & 0x18) == ((i-3) << 3));
prev = ((switches_states & 0x18) == ((i-4) << 3));
}
else {
mask = (1<<(i-2));
@@ -614,7 +614,7 @@ int8_t getMovedSwitch()
if (mask)
switches_states ^= mask;
else
switches_states = (switches_states & 0xE7) | ((i-3) << 3);
switches_states = (switches_states & 0xE7) | ((i-4) << 3);
}
}