Browse Source

Fix stepper shutdown during waiting for temperatures

In the wait loops of M109 M190 idle() is called, what checks
stepper_inactive_time against previous_cmd_ms.
Because we can be several minutes inside the loop, resetting
previous_cmd_ms only outside the loop caused stepper shutdowns.

The name of previous_cmd_ms does not really reflect its use. It's set
not only when a new command was received or executed but also in many of
the movement routines. For that the little extension of using it during
the wait will (hopefully) not hurt.

# Conflicts:
#	Marlin/Configuration_adv.h
pull/1/head
AnHardt 9 years ago
parent
commit
32ae9f9ab7
  1. 4
      Marlin/Marlin_main.cpp

4
Marlin/Marlin_main.cpp

@ -3975,6 +3975,7 @@ inline void gcode_M109() {
}
idle();
refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
#ifdef TEMP_RESIDENCY_TIME
// start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time
@ -3989,7 +3990,6 @@ inline void gcode_M109() {
}
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
refresh_cmd_timeout();
print_job_start_ms = previous_cmd_ms;
}
@ -4024,9 +4024,9 @@ inline void gcode_M109() {
#endif
}
idle();
refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
}
LCD_MESSAGEPGM(MSG_BED_DONE);
refresh_cmd_timeout();
}
#endif // HAS_TEMP_BED

Loading…
Cancel
Save