|
@ -421,19 +421,18 @@ void startOrResumeJob() { |
|
|
* - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT) |
|
|
* - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT) |
|
|
* - Pulse FET_SAFETY_PIN if it exists |
|
|
* - Pulse FET_SAFETY_PIN if it exists |
|
|
*/ |
|
|
*/ |
|
|
inline void manage_inactivity(const bool ignore_stepper_queue=false) { |
|
|
inline void manage_inactivity(const bool no_stepper_sleep=false) { |
|
|
|
|
|
|
|
|
queue.get_available_commands(); |
|
|
queue.get_available_commands(); |
|
|
|
|
|
|
|
|
const millis_t ms = millis(); |
|
|
const millis_t ms = millis(); |
|
|
|
|
|
|
|
|
// Prevent steppers timing-out in the middle of M600
|
|
|
// Prevent steppers timing-out
|
|
|
// unless PAUSE_PARK_NO_STEPPER_TIMEOUT is disabled
|
|
|
const bool do_reset_timeout = no_stepper_sleep |
|
|
const bool parked_or_ignoring = ignore_stepper_queue |
|
|
|
|
|
|| TERN0(PAUSE_PARK_NO_STEPPER_TIMEOUT, did_pause_print); |
|
|
|| TERN0(PAUSE_PARK_NO_STEPPER_TIMEOUT, did_pause_print); |
|
|
|
|
|
|
|
|
// Reset both the M18/M84 activity timeout and the M85 max 'kill' timeout
|
|
|
// Reset both the M18/M84 activity timeout and the M85 max 'kill' timeout
|
|
|
if (parked_or_ignoring) gcode.reset_stepper_timeout(ms); |
|
|
if (do_reset_timeout) gcode.reset_stepper_timeout(ms); |
|
|
|
|
|
|
|
|
if (gcode.stepper_max_timed_out(ms)) { |
|
|
if (gcode.stepper_max_timed_out(ms)) { |
|
|
SERIAL_ERROR_MSG(STR_KILL_INACTIVE_TIME, parser.command_ptr); |
|
|
SERIAL_ERROR_MSG(STR_KILL_INACTIVE_TIME, parser.command_ptr); |
|
@ -449,7 +448,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { |
|
|
// activity timeout and the M85 max 'kill' timeout
|
|
|
// activity timeout and the M85 max 'kill' timeout
|
|
|
if (planner.has_blocks_queued()) |
|
|
if (planner.has_blocks_queued()) |
|
|
gcode.reset_stepper_timeout(ms); |
|
|
gcode.reset_stepper_timeout(ms); |
|
|
else if (!parked_or_ignoring && gcode.stepper_inactive_timeout()) { |
|
|
else if (!do_reset_timeout && gcode.stepper_inactive_timeout()) { |
|
|
if (!already_shutdown_steppers) { |
|
|
if (!already_shutdown_steppers) { |
|
|
already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this
|
|
|
already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this
|
|
|
|
|
|
|
|
@ -732,14 +731,14 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { |
|
|
* - Update the Průša MMU2 |
|
|
* - Update the Průša MMU2 |
|
|
* - Handle Joystick jogging |
|
|
* - Handle Joystick jogging |
|
|
*/ |
|
|
*/ |
|
|
void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { |
|
|
void idle(bool no_stepper_sleep/*=false*/) { |
|
|
#if ENABLED(MARLIN_DEV_MODE) |
|
|
#if ENABLED(MARLIN_DEV_MODE) |
|
|
static uint16_t idle_depth = 0; |
|
|
static uint16_t idle_depth = 0; |
|
|
if (++idle_depth > 5) SERIAL_ECHOLNPAIR("idle() call depth: ", idle_depth); |
|
|
if (++idle_depth > 5) SERIAL_ECHOLNPAIR("idle() call depth: ", idle_depth); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
// Core Marlin activities
|
|
|
// Core Marlin activities
|
|
|
manage_inactivity(TERN_(ADVANCED_PAUSE_FEATURE, no_stepper_sleep)); |
|
|
manage_inactivity(no_stepper_sleep); |
|
|
|
|
|
|
|
|
// Manage Heaters (and Watchdog)
|
|
|
// Manage Heaters (and Watchdog)
|
|
|
thermalManager.manage_heater(); |
|
|
thermalManager.manage_heater(); |
|
|