From abe79b854e73a01a71d94019cb1c696f2abfebc5 Mon Sep 17 00:00:00 2001 From: peteGSX Date: Sat, 4 Feb 2023 09:19:32 +1000 Subject: [PATCH] Fix digital read bug --- IO_EXIOExpander.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IO_EXIOExpander.h b/IO_EXIOExpander.h index 46abc50..59684cd 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -158,7 +158,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; }