debounce unintended auto-increment bug (was: Proteus TCU gear shift configuration) #1927
refactoring
This commit is contained in:
parent
55065781f8
commit
9f237d963b
|
@ -98,9 +98,10 @@ bool ButtonDebounce::readPinState() {
|
||||||
// We don't actually need it to be a class variable in this method,
|
// We don't actually need it to be a class variable in this method,
|
||||||
// but when a method is implemented to actually get the pin's state,
|
// but when a method is implemented to actually get the pin's state,
|
||||||
// for example to implement long button presses, it will be needed.
|
// for example to implement long button presses, it will be needed.
|
||||||
storedValue = false;
|
|
||||||
#if EFI_PROD_CODE || EFI_UNIT_TEST
|
#if EFI_PROD_CODE || EFI_UNIT_TEST
|
||||||
storedValue = efiReadPin(active_pin);
|
storedValue = efiReadPin(active_pin);
|
||||||
|
#else
|
||||||
|
storedValue = false;
|
||||||
#endif
|
#endif
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
// Invert
|
// Invert
|
||||||
|
|
Loading…
Reference in New Issue