mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Fix digital read bug
This commit is contained in:
parent
5efb0c5013
commit
2a3d48dc00
|
@ -156,7 +156,7 @@ private:
|
|||
int _read(VPIN vpin) override {
|
||||
int pin = vpin - _firstVpin;
|
||||
uint8_t pinByte = pin / 8;
|
||||
bool value = _digitalInputStates[pinByte] >> (pin - pinByte * 8);
|
||||
bool value = bitRead(_digitalInputStates[pinByte], pin - pinByte * 8);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user