Pārlūkot izejas kodu

Adjust axis homed / trusted methods (#20323)

Scott Lahteine 3 gadus atpakaļ
vecāks
revīzija
8fd8772a6f
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 4
- 5
Marlin/src/gcode/calibrate/G28.cpp Parādīt failu

319
 
319
 
320
     #endif
320
     #endif
321
 
321
 
322
-    const float z_homing_height =
323
-      ENABLED(UNKNOWN_Z_NO_RAISE) && !TEST(axis_known_position, Z_AXIS)
324
-        ? 0
325
-        : (parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT);
322
+    const float z_homing_height = TERN1(UNKNOWN_Z_NO_RAISE, axis_is_trusted(Z_AXIS))
323
+                                  ? (parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT)
324
+                                  : 0;
326
 
325
 
327
     if (z_homing_height && (doX || doY || TERN0(Z_SAFE_HOMING, doZ))) {
326
     if (z_homing_height && (doX || doY || TERN0(Z_SAFE_HOMING, doZ))) {
328
       // Raise Z before homing any other axes and z is not already high enough (never lower z)
327
       // Raise Z before homing any other axes and z is not already high enough (never lower z)
329
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height);
328
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height);
330
-      do_z_clearance(z_homing_height, true, DISABLED(UNKNOWN_Z_NO_RAISE));
329
+      do_z_clearance(z_homing_height, axis_is_trusted(Z_AXIS), DISABLED(UNKNOWN_Z_NO_RAISE));
331
     }
330
     }
332
 
331
 
333
     #if ENABLED(QUICK_HOME)
332
     #if ENABLED(QUICK_HOME)

+ 1
- 1
Marlin/src/gcode/calibrate/G34.cpp Parādīt failu

39
 void GcodeSuite::G34() {
39
 void GcodeSuite::G34() {
40
 
40
 
41
   // Home before the alignment procedure
41
   // Home before the alignment procedure
42
-  if (!all_axes_known()) home_all_axes();
42
+  if (!all_axes_trusted()) home_all_axes();
43
 
43
 
44
   SET_SOFT_ENDSTOP_LOOSE(true);
44
   SET_SOFT_ENDSTOP_LOOSE(true);
45
   TEMPORARY_BED_LEVELING_STATE(false);
45
   TEMPORARY_BED_LEVELING_STATE(false);

+ 1
- 1
Marlin/src/gcode/calibrate/G34_M422.cpp Parādīt failu

167
       );
167
       );
168
 
168
 
169
       // Home before the alignment procedure
169
       // Home before the alignment procedure
170
-      if (!all_axes_known()) home_all_axes();
170
+      if (!all_axes_trusted()) home_all_axes();
171
 
171
 
172
       // Move the Z coordinate realm towards the positive - dirty trick
172
       // Move the Z coordinate realm towards the positive - dirty trick
173
       current_position.z += z_probe * 0.5f;
173
       current_position.z += z_probe * 0.5f;

+ 1
- 1
Marlin/src/gcode/feature/pause/M600.cpp Parādīt failu

102
 
102
 
103
   #if ENABLED(HOME_BEFORE_FILAMENT_CHANGE)
103
   #if ENABLED(HOME_BEFORE_FILAMENT_CHANGE)
104
     // If needed, home before parking for filament change
104
     // If needed, home before parking for filament change
105
-    if (!all_axes_known()) home_all_axes();
105
+    if (!all_axes_trusted()) home_all_axes();
106
   #endif
106
   #endif
107
 
107
 
108
   #if HAS_MULTI_EXTRUDER
108
   #if HAS_MULTI_EXTRUDER

+ 4
- 8
Marlin/src/gcode/feature/pause/M701_M702.cpp Parādīt failu

59
 void GcodeSuite::M701() {
59
 void GcodeSuite::M701() {
60
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
60
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
61
 
61
 
62
-  #if ENABLED(NO_MOTION_BEFORE_HOMING)
63
-    // Don't raise Z if the machine isn't homed
64
-    if (axes_should_home()) park_point.z = 0;
65
-  #endif
62
+  // Don't raise Z if the machine isn't homed
63
+  if (TERN0(NO_MOTION_BEFORE_HOMING, axes_should_home())) park_point.z = 0;
66
 
64
 
67
   #if ENABLED(MIXING_EXTRUDER)
65
   #if ENABLED(MIXING_EXTRUDER)
68
     const int8_t target_e_stepper = get_target_e_stepper_from_command();
66
     const int8_t target_e_stepper = get_target_e_stepper_from_command();
147
 void GcodeSuite::M702() {
145
 void GcodeSuite::M702() {
148
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
146
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
149
 
147
 
150
-  #if ENABLED(NO_MOTION_BEFORE_HOMING)
151
-    // Don't raise Z if the machine isn't homed
152
-    if (axes_should_home()) park_point.z = 0;
153
-  #endif
148
+  // Don't raise Z if the machine isn't homed
149
+  if (TERN0(NO_MOTION_BEFORE_HOMING, axes_should_home())) park_point.z = 0;
154
 
150
 
155
   #if ENABLED(MIXING_EXTRUDER)
151
   #if ENABLED(MIXING_EXTRUDER)
156
     const uint8_t old_mixing_tool = mixer.get_current_vtool();
152
     const uint8_t old_mixing_tool = mixer.get_current_vtool();

+ 6
- 12
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp Parādīt failu

506
   lcd_put_wchar('X' + uint8_t(axis));
506
   lcd_put_wchar('X' + uint8_t(axis));
507
   if (blink)
507
   if (blink)
508
     lcd_put_u8str(value);
508
     lcd_put_u8str(value);
509
-  else {
510
-    if (!TEST(axis_homed, axis))
511
-      while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
512
-    else {
513
-      #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
514
-        if (!TEST(axis_known_position, axis))
515
-          lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
516
-        else
517
-      #endif
518
-          lcd_put_u8str(value);
519
-    }
520
-  }
509
+  else if (axis_should_home(axis))
510
+    while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
511
+  else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
512
+    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
513
+  else
514
+    lcd_put_u8str(value);
521
 }
515
 }
522
 
516
 
523
 FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
517
 FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {

+ 6
- 12
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp Parādīt failu

422
   lcd.write('X' + uint8_t(axis));
422
   lcd.write('X' + uint8_t(axis));
423
   if (blink)
423
   if (blink)
424
     lcd.print(value);
424
     lcd.print(value);
425
-  else {
426
-    if (!TEST(axis_homed, axis))
427
-      while (const char c = *value++) lcd.write(c <= '.' ? c : '?');
428
-    else {
429
-      #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
430
-        if (!TEST(axis_known_position, axis))
431
-          lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
432
-        else
433
-      #endif
434
-          lcd_put_u8str(value);
435
-    }
436
-  }
425
+  else if (axis_should_home(axis))
426
+    while (const char c = *value++) lcd.write(c <= '.' ? c : '?');
427
+  else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
428
+    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
429
+  else
430
+    lcd_put_u8str(value);
437
 }
431
 }
438
 
432
 
439
 FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) {
433
 FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) {

+ 6
- 12
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Parādīt failu

384
 
384
 
385
   if (blink)
385
   if (blink)
386
     lcd_put_u8str(value);
386
     lcd_put_u8str(value);
387
-  else {
388
-    if (!TEST(axis_homed, axis))
389
-      while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
390
-    else {
391
-      #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
392
-        if (!TEST(axis_known_position, axis))
393
-          lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
394
-        else
395
-      #endif
396
-          lcd_put_u8str(value);
397
-    }
398
-  }
387
+  else if (axis_should_home(axis))
388
+    while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
389
+  else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
390
+    lcd_put_u8str_P(axis == Z_AXIS ? PSTR("       ") : PSTR("    "));
391
+  else
392
+    lcd_put_u8str(value);
399
 }
393
 }
400
 
394
 
401
 /**
395
 /**

+ 5
- 6
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp Parādīt failu

659
   #endif
659
   #endif
660
 }
660
 }
661
 
661
 
662
-void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool position_known) {
662
+void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool position_trusted) {
663
   char str[7];
663
   char str[7];
664
   set_ddram_address(DDRAM_LINE_4);
664
   set_ddram_address(DDRAM_LINE_4);
665
   begin_data();
665
   begin_data();
666
 
666
 
667
   // If position is unknown, flash the labels.
667
   // If position is unknown, flash the labels.
668
-  const unsigned char alt_label = position_known ? 0 : (ui.get_blink() ? ' ' : 0);
668
+  const unsigned char alt_label = position_trusted ? 0 : (ui.get_blink() ? ' ' : 0);
669
 
669
 
670
   if (TERN1(LCD_SHOW_E_TOTAL, !printingIsActive())) {
670
   if (TERN1(LCD_SHOW_E_TOTAL, !printingIsActive())) {
671
     write_byte(alt_label ? alt_label : 'X');
671
     write_byte(alt_label ? alt_label : 'X');
831
       }
831
       }
832
     }
832
     }
833
 
833
 
834
-    if (countdown == 0 && (forceUpdate || position_changed()
835
-      || TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())
836
-    )) draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 1, all_axes_known()));
834
+    if (countdown == 0 && (forceUpdate || position_changed() || TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())))
835
+      draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 1, all_axes_trusted()));
837
   #endif
836
   #endif
838
 }
837
 }
839
 
838
 
855
 
854
 
856
     UNUSED(forceUpdate);
855
     UNUSED(forceUpdate);
857
 
856
 
858
-  #endif // LCD_SET_PROGRESS_MANUALLY || SDSUPPORT
857
+  #endif
859
 }
858
 }
860
 
859
 
861
 void ST7920_Lite_Status_Screen::update(const bool forceUpdate) {
860
 void ST7920_Lite_Status_Screen::update(const bool forceUpdate) {

+ 1
- 2
Marlin/src/lcd/dwin/e3v2/dwin.cpp Parādīt failu

1281
       last_zoffset = dwin_zoffset;
1281
       last_zoffset = dwin_zoffset;
1282
       dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f;
1282
       dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f;
1283
       #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
1283
       #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
1284
-        if ( (ENABLED(BABYSTEP_WITHOUT_HOMING) || all_axes_known()) && (ENABLED(BABYSTEP_ALWAYS_AVAILABLE) || printer_busy()) )
1285
-          babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset);
1284
+        if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset);
1286
       #endif
1285
       #endif
1287
       DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(zoff_line), HMI_ValueStruct.offset_value);
1286
       DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(zoff_line), HMI_ValueStruct.offset_value);
1288
       DWIN_UpdateLCD();
1287
       DWIN_UpdateLCD();

+ 6
- 6
Marlin/src/lcd/extui/ui_api.cpp Parādīt failu

356
   bool canMove(const axis_t axis) {
356
   bool canMove(const axis_t axis) {
357
     switch (axis) {
357
     switch (axis) {
358
       #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
358
       #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
359
-        case X: return TEST(axis_homed, X_AXIS);
360
-        case Y: return TEST(axis_homed, Y_AXIS);
361
-        case Z: return TEST(axis_homed, Z_AXIS);
359
+        case X: return axis_should_home(X_AXIS);
360
+        case Y: return axis_should_home(Y_AXIS);
361
+        case Z: return axis_should_home(Z_AXIS);
362
       #else
362
       #else
363
         case X: case Y: case Z: return true;
363
         case X: case Y: case Z: return true;
364
       #endif
364
       #endif
889
 
889
 
890
   bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
890
   bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
891
 
891
 
892
-  bool isAxisPositionKnown(const axis_t axis) { return TEST(axis_known_position, axis); }
893
-  bool isAxisPositionKnown(const extruder_t) { return TEST(axis_known_position, E_AXIS); }
894
-  bool isPositionKnown() { return all_axes_known(); }
892
+  bool isAxisPositionKnown(const axis_t axis) { return axis_is_trusted((AxisEnum)axis); }
893
+  bool isAxisPositionKnown(const extruder_t) { return axis_is_trusted(E_AXIS); }
894
+  bool isPositionKnown() { return all_axes_trusted(); }
895
   bool isMachineHomed() { return all_axes_homed(); }
895
   bool isMachineHomed() { return all_axes_homed(); }
896
 
896
 
897
   PGM_P getFirmwareName_str() {
897
   PGM_P getFirmwareName_str() {

+ 1
- 2
Marlin/src/lcd/menu/menu.cpp Parādīt failu

188
           doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
188
           doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
189
       }
189
       }
190
       else if (screen == status_screen && currentScreen == menu_main && PENDING(millis(), doubleclick_expire_ms)) {
190
       else if (screen == status_screen && currentScreen == menu_main && PENDING(millis(), doubleclick_expire_ms)) {
191
-        if ( (ENABLED(BABYSTEP_WITHOUT_HOMING) || all_axes_known())
192
-          && (ENABLED(BABYSTEP_ALWAYS_AVAILABLE) || printer_busy()) )
191
+        if (BABYSTEP_ALLOWED())
193
           screen = TERN(BABYSTEP_ZPROBE_OFFSET, lcd_babystep_zoffset, lcd_babystep_z);
192
           screen = TERN(BABYSTEP_ZPROBE_OFFSET, lcd_babystep_zoffset, lcd_babystep_z);
194
         else {
193
         else {
195
           #if ENABLED(MOVE_Z_WHEN_IDLE)
194
           #if ENABLED(MOVE_Z_WHEN_IDLE)

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_corners.cpp Parādīt failu

230
 
230
 
231
 void _lcd_level_bed_corners() {
231
 void _lcd_level_bed_corners() {
232
   ui.defer_status_screen();
232
   ui.defer_status_screen();
233
-  if (!all_axes_known()) {
233
+  if (!all_axes_trusted()) {
234
     set_all_unhomed();
234
     set_all_unhomed();
235
     queue.inject_P(G28_STR);
235
     queue.inject_P(G28_STR);
236
   }
236
   }

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_leveling.cpp Parādīt failu

237
  *    Save Settings       (Req: EEPROM_SETTINGS)
237
  *    Save Settings       (Req: EEPROM_SETTINGS)
238
  */
238
  */
239
 void menu_bed_leveling() {
239
 void menu_bed_leveling() {
240
-  const bool is_homed = all_axes_known(),
240
+  const bool is_homed = all_axes_trusted(),
241
              is_valid = leveling_is_valid();
241
              is_valid = leveling_is_valid();
242
 
242
 
243
   START_MENU();
243
   START_MENU();

+ 1
- 1
Marlin/src/lcd/menu/menu_configuration.cpp Parādīt failu

164
   void menu_tool_offsets() {
164
   void menu_tool_offsets() {
165
 
165
 
166
     auto _recalc_offsets = []{
166
     auto _recalc_offsets = []{
167
-      if (active_extruder && all_axes_known()) {  // For the 2nd extruder re-home so the next tool-change gets the new offsets.
167
+      if (active_extruder && all_axes_trusted()) {  // For the 2nd extruder re-home so the next tool-change gets the new offsets.
168
         queue.inject_P(G28_STR); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
168
         queue.inject_P(G28_STR); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
169
         active_extruder = 0;
169
         active_extruder = 0;
170
       }
170
       }

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp Parādīt failu

524
  */
524
  */
525
 void _ubl_goto_map_screen() {
525
 void _ubl_goto_map_screen() {
526
   if (planner.movesplanned()) return;     // The ACTION_ITEM will do nothing
526
   if (planner.movesplanned()) return;     // The ACTION_ITEM will do nothing
527
-  if (!all_axes_known()) {
527
+  if (!all_axes_trusted()) {
528
     set_all_unhomed();
528
     set_all_unhomed();
529
     queue.inject_P(G28_STR);
529
     queue.inject_P(G28_STR);
530
   }
530
   }

+ 13
- 18
Marlin/src/lcd/tft/ui_320x240.cpp Parādīt failu

257
   tft.set_background(COLOR_BACKGROUND);
257
   tft.set_background(COLOR_BACKGROUND);
258
   tft.add_rectangle(0, 0, 312, 24, COLOR_AXIS_HOMED);
258
   tft.add_rectangle(0, 0, 312, 24, COLOR_AXIS_HOMED);
259
 
259
 
260
-  uint16_t color;
261
-  uint16_t offset;
262
-  bool is_homed;
263
-
264
   tft.add_text( 10, 3, COLOR_AXIS_HOMED , "X");
260
   tft.add_text( 10, 3, COLOR_AXIS_HOMED , "X");
265
   tft.add_text(127, 3, COLOR_AXIS_HOMED , "Y");
261
   tft.add_text(127, 3, COLOR_AXIS_HOMED , "Y");
266
   tft.add_text(219, 3, COLOR_AXIS_HOMED , "Z");
262
   tft.add_text(219, 3, COLOR_AXIS_HOMED , "Z");
267
 
263
 
268
-  is_homed = TEST(axis_homed, X_AXIS);
269
-  tft_string.set(blink & !is_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
270
-  tft.add_text( 68 - tft_string.width(), 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
264
+  bool not_homed = axis_should_home(X_AXIS);
265
+  tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
266
+  tft.add_text( 68 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
271
 
267
 
272
-  is_homed = TEST(axis_homed, Y_AXIS);
273
-  tft_string.set(blink & !is_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
274
-  tft.add_text(185 - tft_string.width(), 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
268
+  not_homed = axis_should_home(Y_AXIS);
269
+  tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
270
+  tft.add_text(185 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
275
 
271
 
276
-  is_homed = TEST(axis_homed, Z_AXIS);
277
-  if (blink & !is_homed) {
272
+  not_homed = axis_should_home(Z_AXIS);
273
+  uint16_t offset = 25;
274
+  if (blink && not_homed)
278
     tft_string.set("?");
275
     tft_string.set("?");
279
-    offset = 25; // ".00"
280
-  }
281
   else {
276
   else {
282
     const float z = LOGICAL_Z_POSITION(current_position.z);
277
     const float z = LOGICAL_Z_POSITION(current_position.z);
283
     tft_string.set(ftostr52sp((int16_t)z));
278
     tft_string.set(ftostr52sp((int16_t)z));
284
     tft_string.rtrim();
279
     tft_string.rtrim();
285
-    offset = tft_string.width();
280
+    offset += tft_string.width();
286
 
281
 
287
     tft_string.set(ftostr52sp(z));
282
     tft_string.set(ftostr52sp(z));
288
-    offset += 25 - tft_string.width();
283
+    offset -= tft_string.width();
289
   }
284
   }
290
-  tft.add_text(301 - tft_string.width() - offset, 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
285
+  tft.add_text(301 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
291
 
286
 
292
   // feed rate
287
   // feed rate
293
   tft.canvas(70, 136, 80, 32);
288
   tft.canvas(70, 136, 80, 32);
294
   tft.set_background(COLOR_BACKGROUND);
289
   tft.set_background(COLOR_BACKGROUND);
295
-  color = feedrate_percentage == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED;
290
+  uint16_t color = feedrate_percentage == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED;
296
   tft.add_image(0, 0, imgFeedRate, color);
291
   tft.add_image(0, 0, imgFeedRate, color);
297
   tft_string.set(i16tostr3rj(feedrate_percentage));
292
   tft_string.set(i16tostr3rj(feedrate_percentage));
298
   tft_string.add('%');
293
   tft_string.add('%');

+ 13
- 18
Marlin/src/lcd/tft/ui_480x320.cpp Parādīt failu

262
   tft.set_background(COLOR_BACKGROUND);
262
   tft.set_background(COLOR_BACKGROUND);
263
   tft.add_rectangle(0, 0, TFT_WIDTH - 8, 34, COLOR_AXIS_HOMED);
263
   tft.add_rectangle(0, 0, TFT_WIDTH - 8, 34, COLOR_AXIS_HOMED);
264
 
264
 
265
-  uint16_t color;
266
-  uint16_t offset;
267
-  bool is_homed;
268
-
269
   tft.add_text( 16, 3, COLOR_AXIS_HOMED , "X");
265
   tft.add_text( 16, 3, COLOR_AXIS_HOMED , "X");
270
   tft.add_text(192, 3, COLOR_AXIS_HOMED , "Y");
266
   tft.add_text(192, 3, COLOR_AXIS_HOMED , "Y");
271
   tft.add_text(330, 3, COLOR_AXIS_HOMED , "Z");
267
   tft.add_text(330, 3, COLOR_AXIS_HOMED , "Z");
272
 
268
 
273
-  is_homed = TEST(axis_homed, X_AXIS);
274
-  tft_string.set(blink & !is_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
275
-  tft.add_text(102 - tft_string.width(), 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
269
+  bool not_homed = axis_should_home(X_AXIS);
270
+  tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x)));
271
+  tft.add_text(102 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
276
 
272
 
277
-  is_homed = TEST(axis_homed, Y_AXIS);
278
-  tft_string.set(blink & !is_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
279
-  tft.add_text(280 - tft_string.width(), 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
273
+  not_homed = axis_should_home(Y_AXIS);
274
+  tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y)));
275
+  tft.add_text(280 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
280
 
276
 
281
-  is_homed = TEST(axis_homed, Z_AXIS);
282
-  if (blink & !is_homed) {
277
+  uint16_t offset = 32;
278
+  not_homed = axis_should_home(Z_AXIS);
279
+  if (blink && not_homed)
283
     tft_string.set("?");
280
     tft_string.set("?");
284
-    offset = 32; // ".00"
285
-  }
286
   else {
281
   else {
287
     const float z = LOGICAL_Z_POSITION(current_position.z);
282
     const float z = LOGICAL_Z_POSITION(current_position.z);
288
     tft_string.set(ftostr52sp((int16_t)z));
283
     tft_string.set(ftostr52sp((int16_t)z));
289
     tft_string.rtrim();
284
     tft_string.rtrim();
290
-    offset = tft_string.width();
285
+    offset += tft_string.width();
291
 
286
 
292
     tft_string.set(ftostr52sp(z));
287
     tft_string.set(ftostr52sp(z));
293
-    offset += 32 - tft_string.width();
288
+    offset -= tft_string.width();
294
   }
289
   }
295
-  tft.add_text(455 - tft_string.width() - offset, 3, is_homed ? COLOR_AXIS_HOMED : COLOR_AXIS_NOT_HOMED, tft_string);
290
+  tft.add_text(455 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string);
296
   TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 4, 132, TFT_WIDTH - 8, 34));
291
   TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 4, 132, TFT_WIDTH - 8, 34));
297
 
292
 
298
   // feed rate
293
   // feed rate
299
   tft.canvas(96, 180, 100, 32);
294
   tft.canvas(96, 180, 100, 32);
300
   tft.set_background(COLOR_BACKGROUND);
295
   tft.set_background(COLOR_BACKGROUND);
301
-  color = feedrate_percentage == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED;
296
+  uint16_t color = feedrate_percentage == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED;
302
   tft.add_image(0, 0, imgFeedRate, color);
297
   tft.add_image(0, 0, imgFeedRate, color);
303
   tft_string.set(i16tostr3rj(feedrate_percentage));
298
   tft_string.set(i16tostr3rj(feedrate_percentage));
304
   tft_string.add('%');
299
   tft_string.add('%');

+ 18
- 17
Marlin/src/module/motion.cpp Parādīt failu

79
  *   Flags that each linear axis was homed.
79
  *   Flags that each linear axis was homed.
80
  *   XYZ on cartesian, ABC on delta, ABZ on SCARA.
80
  *   XYZ on cartesian, ABC on delta, ABZ on SCARA.
81
  *
81
  *
82
- * axis_known_position
83
- *   Flags that the position is known in each linear axis. Set when homed.
82
+ * axis_trusted
83
+ *   Flags that the position is trusted in each linear axis. Set when homed.
84
  *   Cleared whenever a stepper powers off, potentially losing its position.
84
  *   Cleared whenever a stepper powers off, potentially losing its position.
85
  */
85
  */
86
-uint8_t axis_homed, axis_known_position; // = 0
86
+uint8_t axis_homed, axis_trusted; // = 0
87
 
87
 
88
 // Relative Mode. Enable with G91, disable with G90.
88
 // Relative Mode. Enable with G91, disable with G90.
89
 bool relative_mode; // = false;
89
 bool relative_mode; // = false;
506
   do_blocking_move_to(raw.x, raw.y, z, fr_mm_s);
506
   do_blocking_move_to(raw.x, raw.y, z, fr_mm_s);
507
 }
507
 }
508
 
508
 
509
-void do_z_clearance(const float &zclear, const bool z_known/*=true*/, const bool raise_on_unknown/*=true*/, const bool lower_allowed/*=false*/) {
510
-  const bool rel = raise_on_unknown && !z_known;
509
+void do_z_clearance(const float &zclear, const bool z_trusted/*=true*/, const bool raise_on_untrusted/*=true*/, const bool lower_allowed/*=false*/) {
510
+  const bool rel = raise_on_untrusted && !z_trusted;
511
   float zdest = zclear + (rel ? current_position.z : 0.0f);
511
   float zdest = zclear + (rel ? current_position.z : 0.0f);
512
   if (!lower_allowed) NOLESS(zdest, current_position.z);
512
   if (!lower_allowed) NOLESS(zdest, current_position.z);
513
   do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), MMM_TO_MMS(TERN(HAS_BED_PROBE, Z_PROBE_SPEED_FAST, HOMING_FEEDRATE_Z)));
513
   do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), MMM_TO_MMS(TERN(HAS_BED_PROBE, Z_PROBE_SPEED_FAST, HOMING_FEEDRATE_Z)));
649
         constexpr xy_pos_t offs{0};
649
         constexpr xy_pos_t offs{0};
650
       #endif
650
       #endif
651
 
651
 
652
-      if (TERN1(IS_SCARA, TEST(axis_homed, X_AXIS) && TEST(axis_homed, Y_AXIS))) {
652
+      if (TERN1(IS_SCARA, axis_was_homed(X_AXIS) && axis_was_homed(Y_AXIS))) {
653
         const float dist_2 = HYPOT2(target.x - offs.x, target.y - offs.y);
653
         const float dist_2 = HYPOT2(target.x - offs.x, target.y - offs.y);
654
         if (dist_2 > delta_max_radius_2)
654
         if (dist_2 > delta_max_radius_2)
655
           target *= float(delta_max_radius / SQRT(dist_2)); // 200 / 300 = 0.66
655
           target *= float(delta_max_radius / SQRT(dist_2)); // 200 / 300 = 0.66
657
 
657
 
658
     #else
658
     #else
659
 
659
 
660
-      if (TEST(axis_homed, X_AXIS)) {
660
+      if (axis_was_homed(X_AXIS)) {
661
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_X)
661
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_X)
662
           NOLESS(target.x, soft_endstop.min.x);
662
           NOLESS(target.x, soft_endstop.min.x);
663
         #endif
663
         #endif
666
         #endif
666
         #endif
667
       }
667
       }
668
 
668
 
669
-      if (TEST(axis_homed, Y_AXIS)) {
669
+      if (axis_was_homed(Y_AXIS)) {
670
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Y)
670
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Y)
671
           NOLESS(target.y, soft_endstop.min.y);
671
           NOLESS(target.y, soft_endstop.min.y);
672
         #endif
672
         #endif
677
 
677
 
678
     #endif
678
     #endif
679
 
679
 
680
-    if (TEST(axis_homed, Z_AXIS)) {
680
+    if (axis_was_homed(Z_AXIS)) {
681
       #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Z)
681
       #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Z)
682
         NOLESS(target.z, soft_endstop.min.z);
682
         NOLESS(target.z, soft_endstop.min.z);
683
       #endif
683
       #endif
1124
 }
1124
 }
1125
 
1125
 
1126
 uint8_t axes_should_home(uint8_t axis_bits/*=0x07*/) {
1126
 uint8_t axes_should_home(uint8_t axis_bits/*=0x07*/) {
1127
+  #define SHOULD_HOME(A) TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(A)
1127
   // Clear test bits that are trusted
1128
   // Clear test bits that are trusted
1128
-  if (TEST(axis_bits, X_AXIS) && TEST(axis_homed, X_AXIS)) CBI(axis_bits, X_AXIS);
1129
-  if (TEST(axis_bits, Y_AXIS) && TEST(axis_homed, Y_AXIS)) CBI(axis_bits, Y_AXIS);
1130
-  if (TEST(axis_bits, Z_AXIS) && TEST(axis_homed, Z_AXIS)) CBI(axis_bits, Z_AXIS);
1129
+  if (TEST(axis_bits, X_AXIS) && SHOULD_HOME(X_AXIS)) CBI(axis_bits, X_AXIS);
1130
+  if (TEST(axis_bits, Y_AXIS) && SHOULD_HOME(Y_AXIS)) CBI(axis_bits, Y_AXIS);
1131
+  if (TEST(axis_bits, Z_AXIS) && SHOULD_HOME(Z_AXIS)) CBI(axis_bits, Z_AXIS);
1131
   return axis_bits;
1132
   return axis_bits;
1132
 }
1133
 }
1133
 
1134
 
1388
  *
1389
  *
1389
  * DELTA should wait until all homing is done before setting the XYZ
1390
  * DELTA should wait until all homing is done before setting the XYZ
1390
  * current_position to home, because homing is a single operation.
1391
  * current_position to home, because homing is a single operation.
1391
- * In the case where the axis positions are already known and previously
1392
+ * In the case where the axis positions are trusted and previously
1392
  * homed, DELTA could home to X or Y individually by moving either one
1393
  * homed, DELTA could home to X or Y individually by moving either one
1393
  * to the center. However, homing Z always homes XY and Z.
1394
  * to the center. However, homing Z always homes XY and Z.
1394
  *
1395
  *
1401
 void set_axis_is_at_home(const AxisEnum axis) {
1402
 void set_axis_is_at_home(const AxisEnum axis) {
1402
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_is_at_home(", axis_codes[axis], ")");
1403
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_is_at_home(", axis_codes[axis], ")");
1403
 
1404
 
1404
-  SBI(axis_known_position, axis);
1405
-  SBI(axis_homed, axis);
1405
+  set_axis_trusted(axis);
1406
+  set_axis_homed(axis);
1406
 
1407
 
1407
   #if ENABLED(DUAL_X_CARRIAGE)
1408
   #if ENABLED(DUAL_X_CARRIAGE)
1408
     if (axis == X_AXIS && (active_extruder == 1 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) {
1409
     if (axis == X_AXIS && (active_extruder == 1 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) {
1462
 void set_axis_never_homed(const AxisEnum axis) {
1463
 void set_axis_never_homed(const AxisEnum axis) {
1463
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_never_homed(", axis_codes[axis], ")");
1464
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_never_homed(", axis_codes[axis], ")");
1464
 
1465
 
1465
-  CBI(axis_known_position, axis);
1466
-  CBI(axis_homed, axis);
1466
+  set_axis_untrusted(axis);
1467
+  set_axis_unhomed(axis);
1467
 
1468
 
1468
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< set_axis_never_homed(", axis_codes[axis], ")");
1469
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< set_axis_never_homed(", axis_codes[axis], ")");
1469
 
1470
 

+ 23
- 17
Marlin/src/module/motion.h Parādīt failu

34
   #include "scara.h"
34
   #include "scara.h"
35
 #endif
35
 #endif
36
 
36
 
37
-// Axis homed and known-position states
38
-extern uint8_t axis_homed, axis_known_position;
39
-constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
40
-FORCE_INLINE bool no_axes_homed() { return !axis_homed; }
41
-FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
42
-FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
43
-FORCE_INLINE void set_all_homed() { axis_homed = axis_known_position = xyz_bits; }
44
-FORCE_INLINE void set_all_unhomed() { axis_homed = axis_known_position = 0; }
45
-
46
-FORCE_INLINE bool homing_needed() {
47
-  return !TERN(HOME_AFTER_DEACTIVATE, all_axes_known, all_axes_homed)();
48
-}
49
-
50
 // Error margin to work around float imprecision
37
 // Error margin to work around float imprecision
51
 constexpr float fslop = 0.0001;
38
 constexpr float fslop = 0.0001;
52
 
39
 
269
 void remember_feedrate_scaling_off();
256
 void remember_feedrate_scaling_off();
270
 void restore_feedrate_and_scaling();
257
 void restore_feedrate_and_scaling();
271
 
258
 
272
-void do_z_clearance(const float &zclear, const bool z_known=true, const bool raise_on_unknown=true, const bool lower_allowed=false);
259
+void do_z_clearance(const float &zclear, const bool z_trusted=true, const bool raise_on_untrusted=true, const bool lower_allowed=false);
260
+
261
+/**
262
+ * Homing and Trusted Axes
263
+ */
264
+constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
265
+extern uint8_t axis_homed, axis_trusted;
273
 
266
 
274
-//
275
-// Homing
276
-//
277
 void homeaxis(const AxisEnum axis);
267
 void homeaxis(const AxisEnum axis);
278
 void set_axis_is_at_home(const AxisEnum axis);
268
 void set_axis_is_at_home(const AxisEnum axis);
279
 void set_axis_never_homed(const AxisEnum axis);
269
 void set_axis_never_homed(const AxisEnum axis);
280
 uint8_t axes_should_home(uint8_t axis_bits=0x07);
270
 uint8_t axes_should_home(uint8_t axis_bits=0x07);
281
 bool homing_needed_error(uint8_t axis_bits=0x07);
271
 bool homing_needed_error(uint8_t axis_bits=0x07);
282
 
272
 
273
+FORCE_INLINE bool axis_was_homed(const AxisEnum axis)     { return TEST(axis_homed, axis); }
274
+FORCE_INLINE bool axis_is_trusted(const AxisEnum axis)    { return TEST(axis_trusted, axis); }
275
+FORCE_INLINE bool axis_should_home(const AxisEnum axis)   { return (axes_should_home() & _BV(axis)) != 0; }
276
+FORCE_INLINE bool no_axes_homed()                         { return !axis_homed; }
277
+FORCE_INLINE bool all_axes_homed()                        { return xyz_bits == (axis_homed & xyz_bits); }
278
+FORCE_INLINE bool homing_needed()                         { return !all_axes_homed(); }
279
+FORCE_INLINE bool all_axes_trusted()                      { return xyz_bits == (axis_trusted & xyz_bits); }
280
+FORCE_INLINE void set_axis_homed(const AxisEnum axis)     { SBI(axis_homed, axis); }
281
+FORCE_INLINE void set_axis_unhomed(const AxisEnum axis)   { CBI(axis_homed, axis); }
282
+FORCE_INLINE void set_axis_trusted(const AxisEnum axis)   { SBI(axis_trusted, axis); }
283
+FORCE_INLINE void set_axis_untrusted(const AxisEnum axis) { CBI(axis_trusted, axis); }
284
+FORCE_INLINE void set_all_homed()                         { axis_homed = axis_trusted = xyz_bits; }
285
+FORCE_INLINE void set_all_unhomed()                       { axis_homed = axis_trusted = 0; }
286
+
283
 #if ENABLED(NO_MOTION_BEFORE_HOMING)
287
 #if ENABLED(NO_MOTION_BEFORE_HOMING)
284
   #define MOTION_CONDITIONS (IsRunning() && !homing_needed_error())
288
   #define MOTION_CONDITIONS (IsRunning() && !homing_needed_error())
285
 #else
289
 #else
286
   #define MOTION_CONDITIONS IsRunning()
290
   #define MOTION_CONDITIONS IsRunning()
287
 #endif
291
 #endif
288
 
292
 
293
+#define BABYSTEP_ALLOWED() ((ENABLED(BABYSTEP_WITHOUT_HOMING) || all_axes_trusted()) && (ENABLED(BABYSTEP_ALWAYS_AVAILABLE) || printer_busy()))
294
+
289
 /**
295
 /**
290
  * Workspace offsets
296
  * Workspace offsets
291
  */
297
  */

+ 2
- 2
Marlin/src/module/probe.cpp Parādīt failu

350
 
350
 
351
   // For beds that fall when Z is powered off only raise for trusted Z
351
   // For beds that fall when Z is powered off only raise for trusted Z
352
   #if ENABLED(UNKNOWN_Z_NO_RAISE)
352
   #if ENABLED(UNKNOWN_Z_NO_RAISE)
353
-    const bool unknown_condition = TEST(axis_known_position, Z_AXIS);
353
+    const bool unknown_condition = axis_is_trusted(Z_AXIS);
354
   #else
354
   #else
355
     constexpr float unknown_condition = true;
355
     constexpr float unknown_condition = true;
356
   #endif
356
   #endif
510
 
510
 
511
   // Stop the probe before it goes too low to prevent damage.
511
   // Stop the probe before it goes too low to prevent damage.
512
   // If Z isn't known then probe to -10mm.
512
   // If Z isn't known then probe to -10mm.
513
-  const float z_probe_low_point = TEST(axis_known_position, Z_AXIS) ? -offset.z + Z_PROBE_LOW_POINT : -10.0;
513
+  const float z_probe_low_point = axis_is_trusted(Z_AXIS) ? -offset.z + Z_PROBE_LOW_POINT : -10.0;
514
 
514
 
515
   // Double-probing does a fast probe followed by a slow probe
515
   // Double-probing does a fast probe followed by a slow probe
516
   #if TOTAL_PROBING == 2
516
   #if TOTAL_PROBING == 2

+ 3
- 5
Marlin/src/module/stepper/indirection.h Parādīt failu

856
 #endif
856
 #endif
857
 
857
 
858
 #define  ENABLE_AXIS_X() if (SHOULD_ENABLE(x))  {  ENABLE_STEPPER_X();  ENABLE_STEPPER_X2(); AFTER_CHANGE(x, true); }
858
 #define  ENABLE_AXIS_X() if (SHOULD_ENABLE(x))  {  ENABLE_STEPPER_X();  ENABLE_STEPPER_X2(); AFTER_CHANGE(x, true); }
859
-#define DISABLE_AXIS_X() if (SHOULD_DISABLE(x)) { DISABLE_STEPPER_X(); DISABLE_STEPPER_X2(); AFTER_CHANGE(x, false); FORGET_AXIS(X_AXIS); }
859
+#define DISABLE_AXIS_X() if (SHOULD_DISABLE(x)) { DISABLE_STEPPER_X(); DISABLE_STEPPER_X2(); AFTER_CHANGE(x, false); set_axis_untrusted(X_AXIS); }
860
 #define  ENABLE_AXIS_Y() if (SHOULD_ENABLE(y))  {  ENABLE_STEPPER_Y();  ENABLE_STEPPER_Y2(); AFTER_CHANGE(y, true); }
860
 #define  ENABLE_AXIS_Y() if (SHOULD_ENABLE(y))  {  ENABLE_STEPPER_Y();  ENABLE_STEPPER_Y2(); AFTER_CHANGE(y, true); }
861
-#define DISABLE_AXIS_Y() if (SHOULD_DISABLE(y)) { DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); AFTER_CHANGE(y, false); FORGET_AXIS(Y_AXIS); }
861
+#define DISABLE_AXIS_Y() if (SHOULD_DISABLE(y)) { DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); AFTER_CHANGE(y, false); set_axis_untrusted(Y_AXIS); }
862
 #define  ENABLE_AXIS_Z() if (SHOULD_ENABLE(z))  {  ENABLE_STEPPER_Z();  ENABLE_STEPPER_Z2();  ENABLE_STEPPER_Z3();  ENABLE_STEPPER_Z4(); AFTER_CHANGE(z, true); }
862
 #define  ENABLE_AXIS_Z() if (SHOULD_ENABLE(z))  {  ENABLE_STEPPER_Z();  ENABLE_STEPPER_Z2();  ENABLE_STEPPER_Z3();  ENABLE_STEPPER_Z4(); AFTER_CHANGE(z, true); }
863
-#define DISABLE_AXIS_Z() if (SHOULD_DISABLE(z)) { DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); AFTER_CHANGE(z, false); FORGET_AXIS(Z_AXIS); Z_RESET(); }
864
-
865
-#define FORGET_AXIS(A) TERN(HOME_AFTER_DEACTIVATE, set_axis_never_homed(A), CBI(axis_known_position, A))
863
+#define DISABLE_AXIS_Z() if (SHOULD_DISABLE(z)) { DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); AFTER_CHANGE(z, false); set_axis_untrusted(Z_AXIS); Z_RESET(); }
866
 
864
 
867
 #ifdef Z_AFTER_DEACTIVATE
865
 #ifdef Z_AFTER_DEACTIVATE
868
   #define Z_RESET() do{ current_position.z = Z_AFTER_DEACTIVATE; sync_plan_position(); }while(0)
866
   #define Z_RESET() do{ current_position.z = Z_AFTER_DEACTIVATE; sync_plan_position(); }while(0)

Notiek ielāde…
Atcelt
Saglabāt