Make KEEPALIVE_STATE a scoped auto-restore (#14446)
This commit is contained in:
@ -355,7 +355,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
||||
#endif
|
||||
while (wait_for_user) idle();
|
||||
ui.reset_status();
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
|
||||
} while(
|
||||
#if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
|
||||
true
|
||||
|
@ -2925,7 +2925,6 @@ void Temperature::isr() {
|
||||
#endif
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
const GcodeSuite::MarlinBusyState old_busy_state = gcode.busy_state;
|
||||
KEEPALIVE_STATE(NOT_BUSY);
|
||||
#endif
|
||||
|
||||
@ -3019,10 +3018,6 @@ void Temperature::isr() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
gcode.busy_state = old_busy_state;
|
||||
#endif
|
||||
|
||||
return wait_for_heatup;
|
||||
}
|
||||
|
||||
@ -3058,7 +3053,6 @@ void Temperature::isr() {
|
||||
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
const GcodeSuite::MarlinBusyState old_busy_state = gcode.busy_state;
|
||||
KEEPALIVE_STATE(NOT_BUSY);
|
||||
#endif
|
||||
|
||||
@ -3145,10 +3139,6 @@ void Temperature::isr() {
|
||||
|
||||
if (wait_for_heatup) ui.reset_status();
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
gcode.busy_state = old_busy_state;
|
||||
#endif
|
||||
|
||||
return wait_for_heatup;
|
||||
}
|
||||
|
||||
@ -3179,7 +3169,6 @@ void Temperature::isr() {
|
||||
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
const GcodeSuite::MarlinBusyState old_busy_state = gcode.busy_state;
|
||||
KEEPALIVE_STATE(NOT_BUSY);
|
||||
#endif
|
||||
|
||||
@ -3247,10 +3236,6 @@ void Temperature::isr() {
|
||||
|
||||
if (wait_for_heatup) ui.reset_status();
|
||||
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
gcode.busy_state = old_busy_state;
|
||||
#endif
|
||||
|
||||
return wait_for_heatup;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user