Skip to content

Commit

Permalink
More EStop de-bounce fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
nullstalgia committed Oct 9, 2024
1 parent 0845df4 commit 97709f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EStopManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ void _estopEdgeInterrupt(void* arg) {

// Debounce the EStop
bool debounce = now - s_lastStateChange < k_estopDebounceTime;
s_lastStateChange = now;
if (debounce) {
return;
}
Expand All @@ -104,6 +103,8 @@ void _estopEdgeInterrupt(void* arg) {
if (pressed == s_lastState) {
return;
}
s_lastState = pressed;
s_lastStateChange = now;

bool deactivatesAtChanged = false;
int64_t deactivatesAt = 0;
Expand Down

0 comments on commit 97709f6

Please sign in to comment.