From 2a3d48dc009625e1b4384b2c025d6628d160be2d 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 cb31528..d7d73ae 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -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; }