long press increased to 15s

This commit is contained in:
amarofarinha 2024-10-03 13:36:20 +01:00
parent 8fed9f237a
commit f7f1427aef
2 changed files with 5 additions and 5 deletions

View file

@ -137,7 +137,7 @@ unsigned long timeSpentInFaultedMode = 0;
#ifdef EQUIPMENT_STOP_BUTTON #ifdef EQUIPMENT_STOP_BUTTON
volatile unsigned long equipment_button_press_time = 0; // Time when button is pressed volatile unsigned long equipment_button_press_time = 0; // Time when button is pressed
const unsigned long equipment_button_long_press_duration = 5000; // 5 seconds for long press const unsigned long equipment_button_long_press_duration = 15000; // 15 seconds for long press
int equipment_button_lastState = HIGH; // the previous state from the input pin NC int equipment_button_lastState = HIGH; // the previous state from the input pin NC
int equipment_button_currentState; // the current reading from the input pin int equipment_button_currentState; // the current reading from the input pin
unsigned long equipment_button_pressedTime = 0; unsigned long equipment_button_pressedTime = 0;

View file

@ -51,7 +51,7 @@ const char* mqtt_password = "REDACTED"; // Set NULL for no password
#ifdef EQUIPMENT_STOP_BUTTON #ifdef EQUIPMENT_STOP_BUTTON
// Equipment stop button behavior. Use NC button for safety reasons. // Equipment stop button behavior. Use NC button for safety reasons.
//LATCHING_SWITCH - Normally closed (NC), latching switch. When pressed it activates e-stop //LATCHING_SWITCH - Normally closed (NC), latching switch. When pressed it activates e-stop
//MOMENTARY_SWITCH - Short press to activate e-stop, long 5s press to deactivate. E-stop is persistent between reboots //MOMENTARY_SWITCH - Short press to activate e-stop, long 15s press to deactivate. E-stop is persistent between reboots
volatile STOP_BUTTON_BEHAVIOR equipment_stop_behavior = LATCHING_SWITCH; volatile STOP_BUTTON_BEHAVIOR equipment_stop_behavior = LATCHING_SWITCH;
#endif #endif