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