Browse Source

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.
pull/1/head
Marcio Teixeira 6 years ago
committed by Scott Lahteine
parent
commit
e6ebd30f60
  1. 9
      Marlin/src/Marlin.cpp

9
Marlin/src/Marlin.cpp

@ -457,7 +457,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
if (stepper_inactive_time) { if (stepper_inactive_time) {
static bool already_shutdown_steppers; // = false static bool already_shutdown_steppers; // = false
if (planner.has_blocks_queued()) 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)) { else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, gcode.previous_move_ms + stepper_inactive_time)) {
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
@ -473,15 +473,12 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#if ENABLED(DISABLE_INACTIVE_E) #if ENABLED(DISABLE_INACTIVE_E)
disable_e_steppers(); disable_e_steppers();
#endif #endif
#if HAS_LCD_MENU #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
ui.status_screen();
#if ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.lcd_map_control) { if (ubl.lcd_map_control) {
ubl.lcd_map_control = false; ubl.lcd_map_control = false;
ui.defer_status_screen(false); ui.defer_status_screen(false);
} }
#endif #endif
#endif
} }
} }
else else
@ -617,7 +614,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
} }
#endif // !SWITCHING_EXTRUDER #endif // !SWITCHING_EXTRUDER
gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered gcode.reset_stepper_timeout();
} }
#endif // EXTRUDER_RUNOUT_PREVENT #endif // EXTRUDER_RUNOUT_PREVENT

Loading…
Cancel
Save