AutoSwitch corrections
This commit is contained in:
+2
-2
@@ -49,7 +49,7 @@ NAVIGATION = NO
|
|||||||
|
|
||||||
# Switches autmatic selection
|
# Switches autmatic selection
|
||||||
# Values = YES, NO
|
# Values = YES, NO
|
||||||
AUTOSWITCH = YES
|
AUTOSWITCH = NO
|
||||||
|
|
||||||
# AUDIO Mods
|
# AUDIO Mods
|
||||||
# Values = YES, NO
|
# Values = YES, NO
|
||||||
@@ -230,7 +230,7 @@ ifeq ($(NAVIGATION), POTS)
|
|||||||
CPPDEFS += -DNAVIGATION_POT1 -DNAVIGATION_POT2 -DNAVIGATION_POT3
|
CPPDEFS += -DNAVIGATION_POT1 -DNAVIGATION_POT2 -DNAVIGATION_POT3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(AUTOSWITCH), NO)
|
ifeq ($(AUTOSWITCH), YES)
|
||||||
CPPDEFS += -DAUTOSWITCH
|
CPPDEFS += -DAUTOSWITCH
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -610,7 +610,7 @@ int8_t getMovedSwitch()
|
|||||||
prev = (switches_states & mask);
|
prev = (switches_states & mask);
|
||||||
}
|
}
|
||||||
else if (i <= 6) {
|
else if (i <= 6) {
|
||||||
prev = ((switches_states & 0b00011000) == ((i-3) << 3));
|
prev = ((switches_states & 0x18) == ((i-3) << 3));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mask = (1<<(i-2));
|
mask = (1<<(i-2));
|
||||||
@@ -622,7 +622,7 @@ int8_t getMovedSwitch()
|
|||||||
if (mask)
|
if (mask)
|
||||||
switches_states ^= mask;
|
switches_states ^= mask;
|
||||||
else
|
else
|
||||||
switches_states = (switches_states & 0b11100111) | ((i-3) << 3);
|
switches_states = (switches_states & 0xE7) | ((i-3) << 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user