From 75bd33308758352eef6d1fa43310e547b4f7c7f6 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Mon, 24 May 2021 11:20:15 -1000 Subject: [PATCH] Moved coolant delay into the class set_state() method --- Grbl_Esp32/src/CoolantControl.cpp | 1 + Grbl_Esp32/src/Protocol.cpp | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/CoolantControl.cpp b/Grbl_Esp32/src/CoolantControl.cpp index a69db283..68146ef0 100644 --- a/Grbl_Esp32/src/CoolantControl.cpp +++ b/Grbl_Esp32/src/CoolantControl.cpp @@ -97,6 +97,7 @@ void CoolantControl::set_state(CoolantState state) { } write(state); sys.report_ovr_counter = 0; // Set to report change immediately + delay_msec(int32_t(1000.0 * _delay), DwellMode::SysSuspend); } void CoolantControl::off() { diff --git a/Grbl_Esp32/src/Protocol.cpp b/Grbl_Esp32/src/Protocol.cpp index 25a1df6c..5df6e637 100644 --- a/Grbl_Esp32/src/Protocol.cpp +++ b/Grbl_Esp32/src/Protocol.cpp @@ -682,10 +682,7 @@ static void protocol_exec_rt_suspend() { if (gc_state.modal.coolant.Flood || gc_state.modal.coolant.Mist) { // Block if safety door re-opened during prior restore actions. if (!sys.suspend.bit.restartRetract) { - // NOTE: Laser mode will honor this delay. An exhaust system is often controlled by this pin. config->_coolant->set_state(restore_coolant); - // TODO: Should this be buried in _coolant->set_state() ? - delay_msec(int32_t(1000.0 * config->_coolant->_delay), DwellMode::SysSuspend); } } #ifdef PARKING_ENABLE