[2.0.x] Automatically reset stepper timeout (#10179)
* Automatically reset stepper timeout in manage_inactivity Any code that adds moves to the planner can skip resetting the stepper timeout. We can let `idle` / `manage_inactivity` reset the timer whenever it detects any moves in the planner. * blocks_queued => has_blocks_queued
This commit is contained in:
@ -1885,7 +1885,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
// Encoder knob or keypad buttons adjust the Z position
|
||||
//
|
||||
if (encoderPosition) {
|
||||
gcode.refresh_cmd_timeout();
|
||||
const float z = current_position[Z_AXIS] + float((int32_t)encoderPosition) * (MBL_Z_STEP);
|
||||
line_to_z(constrain(z, -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5));
|
||||
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
|
||||
@ -2409,7 +2408,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
stepper.cleaning_buffer_counter = 0;
|
||||
set_current_from_steppers_for_axis(ALL_AXES);
|
||||
sync_plan_position();
|
||||
gcode.refresh_cmd_timeout();
|
||||
}
|
||||
|
||||
void _lcd_ubl_output_map_lcd() {
|
||||
@ -2424,10 +2422,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
if (encoderPosition) {
|
||||
step_scaler += (int32_t)encoderPosition;
|
||||
x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
|
||||
if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM)
|
||||
step_scaler = 0;
|
||||
gcode.refresh_cmd_timeout();
|
||||
|
||||
if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) step_scaler = 0;
|
||||
encoderPosition = 0;
|
||||
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
|
||||
}
|
||||
@ -2909,7 +2904,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition && !processing_manual_move) {
|
||||
gcode.refresh_cmd_timeout();
|
||||
|
||||
// Start with no limits to movement
|
||||
float min = current_position[axis] - 1000,
|
||||
|
Reference in New Issue
Block a user