Kaynağa Gözat

[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
Scott Lahteine 7 yıl önce
ebeveyn
işleme
1cb810ff1c
No account linked to committer's email address

+ 26
- 23
Marlin/src/Marlin.cpp Dosyayı Görüntüle

336
 
336
 
337
   const millis_t ms = millis();
337
   const millis_t ms = millis();
338
 
338
 
339
-  if (max_inactive_time && ELAPSED(ms, gcode.previous_cmd_ms + max_inactive_time)) {
339
+  if (max_inactive_time && ELAPSED(ms, gcode.previous_move_ms + max_inactive_time)) {
340
     SERIAL_ERROR_START();
340
     SERIAL_ERROR_START();
341
     SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr);
341
     SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr);
342
     kill(PSTR(MSG_KILLED));
342
     kill(PSTR(MSG_KILLED));
349
     #define MOVE_AWAY_TEST true
349
     #define MOVE_AWAY_TEST true
350
   #endif
350
   #endif
351
 
351
 
352
-  if (MOVE_AWAY_TEST && stepper_inactive_time && ELAPSED(ms, gcode.previous_cmd_ms + stepper_inactive_time)
353
-      && !ignore_stepper_queue && !planner.blocks_queued()) {
354
-    #if ENABLED(DISABLE_INACTIVE_X)
355
-      disable_X();
356
-    #endif
357
-    #if ENABLED(DISABLE_INACTIVE_Y)
358
-      disable_Y();
359
-    #endif
360
-    #if ENABLED(DISABLE_INACTIVE_Z)
361
-      disable_Z();
362
-    #endif
363
-    #if ENABLED(DISABLE_INACTIVE_E)
364
-      disable_e_steppers();
365
-    #endif
366
-    #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL)  // Only needed with an LCD
367
-      if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
368
-    #endif
352
+  if (stepper_inactive_time) {
353
+    if (planner.has_blocks_queued())
354
+      gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
355
+    else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, gcode.previous_move_ms + stepper_inactive_time)) {
356
+      #if ENABLED(DISABLE_INACTIVE_X)
357
+        disable_X();
358
+      #endif
359
+      #if ENABLED(DISABLE_INACTIVE_Y)
360
+        disable_Y();
361
+      #endif
362
+      #if ENABLED(DISABLE_INACTIVE_Z)
363
+        disable_Z();
364
+      #endif
365
+      #if ENABLED(DISABLE_INACTIVE_E)
366
+        disable_e_steppers();
367
+      #endif
368
+      #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTIPANEL)  // Only needed with an LCD
369
+        if (ubl.lcd_map_control) ubl.lcd_map_control = defer_return_to_status = false;
370
+      #endif
371
+    }
369
   }
372
   }
370
 
373
 
371
   #ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH
374
   #ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH
424
 
427
 
425
   #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
428
   #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
426
     if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP
429
     if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP
427
-      && ELAPSED(ms, gcode.previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
428
-      && !planner.blocks_queued()
430
+      && ELAPSED(ms, gcode.previous_move_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL)
431
+      && !planner.has_blocks_queued()
429
     ) {
432
     ) {
430
       #if ENABLED(SWITCHING_EXTRUDER)
433
       #if ENABLED(SWITCHING_EXTRUDER)
431
         const bool oldstatus = E0_ENABLE_READ;
434
         const bool oldstatus = E0_ENABLE_READ;
449
         }
452
         }
450
       #endif // !SWITCHING_EXTRUDER
453
       #endif // !SWITCHING_EXTRUDER
451
 
454
 
452
-      gcode.refresh_cmd_timeout();
453
-
454
       const float olde = current_position[E_AXIS];
455
       const float olde = current_position[E_AXIS];
455
       current_position[E_AXIS] += EXTRUDER_RUNOUT_EXTRUDE;
456
       current_position[E_AXIS] += EXTRUDER_RUNOUT_EXTRUDE;
456
       planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
457
       planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
476
           #endif // E_STEPPERS > 1
477
           #endif // E_STEPPERS > 1
477
         }
478
         }
478
       #endif // !SWITCHING_EXTRUDER
479
       #endif // !SWITCHING_EXTRUDER
480
+
481
+      gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
479
     }
482
     }
480
   #endif // EXTRUDER_RUNOUT_PREVENT
483
   #endif // EXTRUDER_RUNOUT_PREVENT
481
 
484
 
541
 
544
 
542
   #if ENABLED(I2C_POSITION_ENCODERS)
545
   #if ENABLED(I2C_POSITION_ENCODERS)
543
     static millis_t i2cpem_next_update_ms;
546
     static millis_t i2cpem_next_update_ms;
544
-    if (planner.blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) {
547
+    if (planner.has_blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) {
545
       I2CPEM.update();
548
       I2CPEM.update();
546
       i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS;
549
       i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS;
547
     }
550
     }

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Dosyayı Görüntüle

779
       wait_for_release();
779
       wait_for_release();
780
       while (!is_lcd_clicked()) {
780
       while (!is_lcd_clicked()) {
781
         idle();
781
         idle();
782
-        gcode.refresh_cmd_timeout();
782
+        gcode.reset_stepper_timeout(); // Keep steppers powered
783
         if (encoder_diff) {
783
         if (encoder_diff) {
784
           do_blocking_move_to_z(current_position[Z_AXIS] + float(encoder_diff) * multiplier);
784
           do_blocking_move_to_z(current_position[Z_AXIS] + float(encoder_diff) * multiplier);
785
           encoder_diff = 0;
785
           encoder_diff = 0;

+ 1
- 4
Marlin/src/gcode/config/M43.cpp Dosyayı Görüntüle

155
     } while (++i < 4);
155
     } while (++i < 4);
156
     if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
156
     if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
157
 
157
 
158
-    gcode.refresh_cmd_timeout();
159
-
160
     if (deploy_state != stow_state) {
158
     if (deploy_state != stow_state) {
161
       SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
159
       SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
162
       if (deploy_state) {
160
       if (deploy_state) {
182
 
180
 
183
         safe_delay(2);
181
         safe_delay(2);
184
 
182
 
185
-        if (0 == j % (500 * 1)) // keep cmd_timeout happy
186
-          gcode.refresh_cmd_timeout();
183
+        if (0 == j % (500 * 1)) gcode.reset_stepper_timeout(); // Keep steppers powered
187
 
184
 
188
         if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
185
         if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
189
 
186
 

+ 4
- 3
Marlin/src/gcode/gcode.cpp Dosyayı Görüntüle

43
 #include "../Marlin.h" // for idle() and suspend_auto_report
43
 #include "../Marlin.h" // for idle() and suspend_auto_report
44
 
44
 
45
 uint8_t GcodeSuite::target_extruder;
45
 uint8_t GcodeSuite::target_extruder;
46
-millis_t GcodeSuite::previous_cmd_ms;
46
+millis_t GcodeSuite::previous_move_ms;
47
 
47
 
48
 bool GcodeSuite::axis_relative_modes[] = AXIS_RELATIVE_MODES;
48
 bool GcodeSuite::axis_relative_modes[] = AXIS_RELATIVE_MODES;
49
 
49
 
121
  * Dwell waits immediately. It does not synchronize. Use M400 instead of G4
121
  * Dwell waits immediately. It does not synchronize. Use M400 instead of G4
122
  */
122
  */
123
 void GcodeSuite::dwell(millis_t time) {
123
 void GcodeSuite::dwell(millis_t time) {
124
-  refresh_cmd_timeout();
125
-  time += previous_cmd_ms;
124
+  time += millis();
126
   while (PENDING(millis(), time)) idle();
125
   while (PENDING(millis(), time)) idle();
127
 }
126
 }
128
 
127
 
735
     #endif
734
     #endif
736
   }
735
   }
737
 
736
 
737
+  reset_stepper_timeout(); // Keep steppers powered
738
+
738
   // Parse the next command in the queue
739
   // Parse the next command in the queue
739
   parser.parse(current_command);
740
   parser.parse(current_command);
740
   process_parsed_command();
741
   process_parsed_command();

+ 2
- 2
Marlin/src/gcode/gcode.h Dosyayı Görüntüle

280
     static bool select_coordinate_system(const int8_t _new);
280
     static bool select_coordinate_system(const int8_t _new);
281
   #endif
281
   #endif
282
 
282
 
283
-  static millis_t previous_cmd_ms;
284
-  FORCE_INLINE static void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
283
+  static millis_t previous_move_ms;
284
+  FORCE_INLINE static void reset_stepper_timeout() { previous_move_ms = millis(); }
285
 
285
 
286
   static bool get_target_extruder_from_command();
286
   static bool get_target_extruder_from_command();
287
   static void get_destination_from_command();
287
   static void get_destination_from_command();

+ 1
- 2
Marlin/src/gcode/lcd/M0_M1.cpp Dosyayı Görüntüle

75
   wait_for_user = true;
75
   wait_for_user = true;
76
 
76
 
77
   stepper.synchronize();
77
   stepper.synchronize();
78
-  refresh_cmd_timeout();
79
 
78
 
80
   if (ms > 0) {
79
   if (ms > 0) {
81
-    ms += previous_cmd_ms;  // wait until this time for a click
80
+    ms += previous_move_ms;  // wait until this time for a click
82
     while (PENDING(millis(), ms) && wait_for_user) idle();
81
     while (PENDING(millis(), ms) && wait_for_user) idle();
83
   }
82
   }
84
   else {
83
   else {

+ 1
- 1
Marlin/src/gcode/motion/G2_G3.cpp Dosyayı Görüntüle

269
 
269
 
270
       // Send the arc to the planner
270
       // Send the arc to the planner
271
       plan_arc(destination, arc_offset, clockwise);
271
       plan_arc(destination, arc_offset, clockwise);
272
-      refresh_cmd_timeout();
272
+      reset_stepper_timeout();
273
     }
273
     }
274
     else {
274
     else {
275
       // Bad arguments
275
       // Bad arguments

+ 0
- 1
Marlin/src/gcode/queue.cpp Dosyayı Görüntüle

204
     const int16_t port = command_queue_port[cmd_queue_index_r];
204
     const int16_t port = command_queue_port[cmd_queue_index_r];
205
     if (port < 0) return;
205
     if (port < 0) return;
206
   #endif
206
   #endif
207
-  gcode.refresh_cmd_timeout();
208
   if (!send_ok[cmd_queue_index_r]) return;
207
   if (!send_ok[cmd_queue_index_r]) return;
209
   SERIAL_PROTOCOLPGM_P(port, MSG_OK);
208
   SERIAL_PROTOCOLPGM_P(port, MSG_OK);
210
   #if ENABLED(ADVANCED_OK)
209
   #if ENABLED(ADVANCED_OK)

+ 1
- 1
Marlin/src/gcode/temperature/M104_M109.cpp Dosyayı Görüntüle

185
     }
185
     }
186
 
186
 
187
     idle();
187
     idle();
188
-    refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
188
+    reset_stepper_timeout(); // Keep steppers powered
189
 
189
 
190
     const float temp = thermalManager.degHotend(target_extruder);
190
     const float temp = thermalManager.degHotend(target_extruder);
191
 
191
 

+ 1
- 1
Marlin/src/gcode/temperature/M140_M190.cpp Dosyayı Görüntüle

122
     }
122
     }
123
 
123
 
124
     idle();
124
     idle();
125
-    refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
125
+    reset_stepper_timeout(); // Keep steppers powered
126
 
126
 
127
     const float temp = thermalManager.degBed();
127
     const float temp = thermalManager.degBed();
128
 
128
 

+ 1
- 7
Marlin/src/lcd/ultralcd.cpp Dosyayı Görüntüle

1885
       // Encoder knob or keypad buttons adjust the Z position
1885
       // Encoder knob or keypad buttons adjust the Z position
1886
       //
1886
       //
1887
       if (encoderPosition) {
1887
       if (encoderPosition) {
1888
-        gcode.refresh_cmd_timeout();
1889
         const float z = current_position[Z_AXIS] + float((int32_t)encoderPosition) * (MBL_Z_STEP);
1888
         const float z = current_position[Z_AXIS] + float((int32_t)encoderPosition) * (MBL_Z_STEP);
1890
         line_to_z(constrain(z, -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5));
1889
         line_to_z(constrain(z, -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5));
1891
         lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
1890
         lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
2409
       stepper.cleaning_buffer_counter = 0;
2408
       stepper.cleaning_buffer_counter = 0;
2410
       set_current_from_steppers_for_axis(ALL_AXES);
2409
       set_current_from_steppers_for_axis(ALL_AXES);
2411
       sync_plan_position();
2410
       sync_plan_position();
2412
-      gcode.refresh_cmd_timeout();
2413
     }
2411
     }
2414
 
2412
 
2415
     void _lcd_ubl_output_map_lcd() {
2413
     void _lcd_ubl_output_map_lcd() {
2424
       if (encoderPosition) {
2422
       if (encoderPosition) {
2425
         step_scaler += (int32_t)encoderPosition;
2423
         step_scaler += (int32_t)encoderPosition;
2426
         x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
2424
         x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
2427
-        if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM)
2428
-          step_scaler = 0;
2429
-        gcode.refresh_cmd_timeout();
2430
-
2425
+        if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM) step_scaler = 0;
2431
         encoderPosition = 0;
2426
         encoderPosition = 0;
2432
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
2427
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
2433
       }
2428
       }
2909
     if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
2904
     if (use_click()) { return lcd_goto_previous_menu_no_defer(); }
2910
     ENCODER_DIRECTION_NORMAL();
2905
     ENCODER_DIRECTION_NORMAL();
2911
     if (encoderPosition && !processing_manual_move) {
2906
     if (encoderPosition && !processing_manual_move) {
2912
-      gcode.refresh_cmd_timeout();
2913
 
2907
 
2914
       // Start with no limits to movement
2908
       // Start with no limits to movement
2915
       float min = current_position[axis] - 1000,
2909
       float min = current_position[axis] - 1000,

+ 0
- 5
Marlin/src/module/motion.cpp Dosyayı Görüntüle

266
       if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_uninterpolated_move_to_destination", destination);
266
       if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_uninterpolated_move_to_destination", destination);
267
     #endif
267
     #endif
268
 
268
 
269
-    gcode.refresh_cmd_timeout();
270
-
271
     #if UBL_SEGMENTED
269
     #if UBL_SEGMENTED
272
       // ubl segmented line will do z-only moves in single segment
270
       // ubl segmented line will do z-only moves in single segment
273
       ubl.prepare_segmented_line_to(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s));
271
       ubl.prepare_segmented_line_to(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s));
435
     saved_feedrate_mm_s = feedrate_mm_s;
433
     saved_feedrate_mm_s = feedrate_mm_s;
436
     saved_feedrate_percentage = feedrate_percentage;
434
     saved_feedrate_percentage = feedrate_percentage;
437
     feedrate_percentage = 100;
435
     feedrate_percentage = 100;
438
-    gcode.refresh_cmd_timeout();
439
   }
436
   }
440
   else {
437
   else {
441
     feedrate_mm_s = saved_feedrate_mm_s;
438
     feedrate_mm_s = saved_feedrate_mm_s;
442
     feedrate_percentage = saved_feedrate_percentage;
439
     feedrate_percentage = saved_feedrate_percentage;
443
-    gcode.refresh_cmd_timeout();
444
   }
440
   }
445
 }
441
 }
446
 
442
 
859
  */
855
  */
860
 void prepare_move_to_destination() {
856
 void prepare_move_to_destination() {
861
   clamp_to_software_endstops(destination);
857
   clamp_to_software_endstops(destination);
862
-  gcode.refresh_cmd_timeout();
863
 
858
 
864
   #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
859
   #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
865
 
860
 

+ 2
- 2
Marlin/src/module/planner.cpp Dosyayı Görüntüle

468
     #endif
468
     #endif
469
   #endif
469
   #endif
470
 
470
 
471
-  if (blocks_queued()) {
471
+  if (has_blocks_queued()) {
472
 
472
 
473
     #if FAN_COUNT > 0
473
     #if FAN_COUNT > 0
474
       for (uint8_t i = 0; i < FAN_COUNT; i++)
474
       for (uint8_t i = 0; i < FAN_COUNT; i++)
1547
   //*/
1547
   //*/
1548
 
1548
 
1549
   // Always split the first move into two (if not homing or probing)
1549
   // Always split the first move into two (if not homing or probing)
1550
-  if (!blocks_queued()) {
1550
+  if (!has_blocks_queued()) {
1551
 
1551
 
1552
     #define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1
1552
     #define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1
1553
     const int32_t between[ABCE] = { _BETWEEN(A), _BETWEEN(B), _BETWEEN(C), _BETWEEN(E) };
1553
     const int32_t between[ABCE] = { _BETWEEN(A), _BETWEEN(B), _BETWEEN(C), _BETWEEN(E) };

+ 4
- 4
Marlin/src/module/planner.h Dosyayı Görüntüle

512
     /**
512
     /**
513
      * Does the buffer have any blocks queued?
513
      * Does the buffer have any blocks queued?
514
      */
514
      */
515
-    static bool blocks_queued() { return (block_buffer_head != block_buffer_tail); }
515
+    static bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); }
516
 
516
 
517
     /**
517
     /**
518
      * "Discard" the block and "release" the memory.
518
      * "Discard" the block and "release" the memory.
519
      * Called when the current block is no longer needed.
519
      * Called when the current block is no longer needed.
520
      */
520
      */
521
     FORCE_INLINE static void discard_current_block() {
521
     FORCE_INLINE static void discard_current_block() {
522
-      if (blocks_queued())
522
+      if (has_blocks_queued())
523
         block_buffer_tail = BLOCK_MOD(block_buffer_tail + 1);
523
         block_buffer_tail = BLOCK_MOD(block_buffer_tail + 1);
524
     }
524
     }
525
 
525
 
528
      * Called after an interrupted move to throw away the rest of the move.
528
      * Called after an interrupted move to throw away the rest of the move.
529
      */
529
      */
530
     FORCE_INLINE static bool discard_continued_block() {
530
     FORCE_INLINE static bool discard_continued_block() {
531
-      const bool discard = blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED);
531
+      const bool discard = has_blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED);
532
       if (discard) discard_current_block();
532
       if (discard) discard_current_block();
533
       return discard;
533
       return discard;
534
     }
534
     }
539
      * WARNING: Called from Stepper ISR context!
539
      * WARNING: Called from Stepper ISR context!
540
      */
540
      */
541
     static block_t* get_current_block() {
541
     static block_t* get_current_block() {
542
-      if (blocks_queued()) {
542
+      if (has_blocks_queued()) {
543
         block_t * const block = &block_buffer[block_buffer_tail];
543
         block_t * const block = &block_buffer[block_buffer_tail];
544
 
544
 
545
         // If the block has no trapezoid calculated, it's unsafe to execute.
545
         // If the block has no trapezoid calculated, it's unsafe to execute.

+ 0
- 3
Marlin/src/module/probe.cpp Dosyayı Görüntüle

545
     if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
545
     if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
546
   #endif
546
   #endif
547
 
547
 
548
-  // Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding
549
-  gcode.refresh_cmd_timeout();
550
-
551
   // Double-probing does a fast probe followed by a slow probe
548
   // Double-probing does a fast probe followed by a slow probe
552
   #if MULTIPLE_PROBING == 2
549
   #if MULTIPLE_PROBING == 2
553
 
550
 

+ 2
- 2
Marlin/src/module/stepper.cpp Dosyayı Görüntüle

1091
 /**
1091
 /**
1092
  * Block until all buffered steps are executed / cleaned
1092
  * Block until all buffered steps are executed / cleaned
1093
  */
1093
  */
1094
-void Stepper::synchronize() { while (planner.blocks_queued() || cleaning_buffer_counter) idle(); }
1094
+void Stepper::synchronize() { while (planner.has_blocks_queued() || cleaning_buffer_counter) idle(); }
1095
 
1095
 
1096
 /**
1096
 /**
1097
  * Set the stepper positions directly in steps
1097
  * Set the stepper positions directly in steps
1191
 void Stepper::quick_stop() {
1191
 void Stepper::quick_stop() {
1192
   cleaning_buffer_counter = 5000;
1192
   cleaning_buffer_counter = 5000;
1193
   DISABLE_STEPPER_DRIVER_INTERRUPT();
1193
   DISABLE_STEPPER_DRIVER_INTERRUPT();
1194
-  while (planner.blocks_queued()) planner.discard_current_block();
1194
+  while (planner.has_blocks_queued()) planner.discard_current_block();
1195
   current_block = NULL;
1195
   current_block = NULL;
1196
   ENABLE_STEPPER_DRIVER_INTERRUPT();
1196
   ENABLE_STEPPER_DRIVER_INTERRUPT();
1197
   #if ENABLED(ULTRA_LCD)
1197
   #if ENABLED(ULTRA_LCD)

Loading…
İptal
Kaydet