From e360c6248000cf84d666e76f8eb6baf55293ac30 Mon Sep 17 00:00:00 2001 From: IhorNehrutsa <70886343+IhorNehrutsa@users.noreply.github.com> Date: Thu, 4 May 2023 05:09:18 +0300 Subject: [PATCH] RemoteHardwareModule.cpp: Hot Fix digitalReads() pinModes(mask, INPUT_PULLUP) (#2459) --- src/modules/RemoteHardwareModule.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/RemoteHardwareModule.cpp b/src/modules/RemoteHardwareModule.cpp index 2a90c2b66..c3232d266 100644 --- a/src/modules/RemoteHardwareModule.cpp +++ b/src/modules/RemoteHardwareModule.cpp @@ -29,10 +29,7 @@ static uint64_t digitalReads(uint64_t mask) { uint64_t res = 0; - // The Arduino docs show to run pinMode(). But, when testing, found it is best not to. - // If the line below is uncommented, read will flip the pin to the default of the second - // argument in pinModes(), which will make the read turn the PIN "on". - // pinModes(mask, INPUT_PULLUP); + pinModes(mask, INPUT_PULLUP); for (uint64_t i = 0; i < NUM_GPIOS; i++) { uint64_t m = 1ULL << i;