1
0
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:
peteGSX 2023-02-04 09:19:32 +10:00 committed by peteGSX
parent 5efb0c5013
commit 2a3d48dc00

View File

@ -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;
}