Fix LCD issue on stepper timeout (#13630)

- Remove a re-paint of the status screen on stepper timeout, which would cause a garbled LCD with `LIGHTWEIGHT_UI` and could interrupt whatever else the user might be doing in a submenu (such as playing games!)
- Use the helper function to reset stepper timeout.
This commit is contained in:
Marcio Teixeira 2019-04-10 14:51:48 -06:00 committed by Scott Lahteine
parent a8edd4f6d4
commit e6ebd30f60

View File

@ -457,7 +457,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
if (stepper_inactive_time) {
static bool already_shutdown_steppers; // = false
if (planner.has_blocks_queued())
gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
gcode.reset_stepper_timeout();
else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, gcode.previous_move_ms + stepper_inactive_time)) {
if (!already_shutdown_steppers) {
already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this
@ -473,14 +473,11 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#if ENABLED(DISABLE_INACTIVE_E)
disable_e_steppers();
#endif
#if HAS_LCD_MENU
ui.status_screen();
#if ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.lcd_map_control) {
ubl.lcd_map_control = false;
ui.defer_status_screen(false);
}
#endif
#if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.lcd_map_control) {
ubl.lcd_map_control = false;
ui.defer_status_screen(false);
}
#endif
}
}
@ -617,7 +614,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
}
#endif // !SWITCHING_EXTRUDER
gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
gcode.reset_stepper_timeout();
}
#endif // EXTRUDER_RUNOUT_PREVENT