Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteHardwareModule.cpp: Fix digitalReads() pinModes(mask, INPUT_PULLUP) #2459

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/modules/RemoteHardwareModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down