Skip to content

Commit

Permalink
AHEncoder::begin(): return if interrupts in use
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Feb 8, 2023
1 parent 02374bc commit 39182bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Submodules/Encoder/AHEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ AHEncoder::~AHEncoder() {
}

void AHEncoder::begin() {
if (interrupts_in_use > 0)
return;
pinMode(pins[0], INPUT_PULLUP);
pinMode(pins[1], INPUT_PULLUP);
// allow time for a passive R-C filter to charge
Expand Down

0 comments on commit 39182bb

Please sign in to comment.