Skip to content

Commit

Permalink
Fixed error in newSettings() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfvalvo authored Oct 13, 2021
1 parent c70e671 commit d83d04d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NewEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ bool NewEncoder::newSettings(int16_t newMin, int16_t newMax, int16_t newCurrent,
stateChanged = false;
liveState.currentValue = newCurrent;
liveState.currentClick = NoClick;
_minValue = newMin;
_maxValue = newMax;
memcpy((void *) &localState, (void *) &liveState, sizeof(EncoderState));
interrupts();
memcpy((void *) &state, (void *) &localState, sizeof(EncoderState));
Expand Down

0 comments on commit d83d04d

Please sign in to comment.