Переглянути джерело

Fix and improve Power-Loss Recovery (#21779)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
tobuh 3 роки тому
джерело
коміт
8e56f9366d
Аккаунт користувача з таким Email не знайдено

+ 13
- 4
Marlin/src/feature/pause.cpp Переглянути файл

@@ -406,6 +406,15 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
406 406
   // Save current position
407 407
   resume_position = current_position;
408 408
 
409
+  // Will the nozzle be parking?
410
+  const bool do_park = !axes_should_home();
411
+
412
+  #if ENABLED(POWER_LOSS_RECOVERY)
413
+    // Save PLR info in case the power goes out while parked
414
+    const float park_raise = do_park ? nozzle.park_mode_0_height(park_point.z) - current_position.z : POWER_LOSS_ZRAISE;
415
+    if (was_sd_printing && recovery.enabled) recovery.save(true, park_raise, do_park);
416
+  #endif
417
+
409 418
   // Wait for buffered blocks to complete
410 419
   planner.synchronize();
411 420
 
@@ -419,9 +428,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
419 428
     unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
420 429
   }
421 430
 
422
-  // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
423
-  if (!axes_should_home())
424
-    nozzle.park(0, park_point);
431
+  // If axes don't need to home then the nozzle can park
432
+  if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
425 433
 
426 434
   #if ENABLED(DUAL_X_CARRIAGE)
427 435
     const int8_t saved_ext        = active_extruder;
@@ -429,7 +437,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
429 437
     set_duplication_enabled(false, DXC_ext);
430 438
   #endif
431 439
 
432
-  if (unload_length)   // Unload the filament
440
+  // Unload the filament, if specified
441
+  if (unload_length)
433 442
     unload_filament(unload_length, show_lcd, PAUSE_MODE_CHANGE_FILAMENT);
434 443
 
435 444
   #if ENABLED(DUAL_X_CARRIAGE)

+ 119
- 53
Marlin/src/feature/powerloss.cpp Переглянути файл

@@ -144,7 +144,7 @@ void PrintJobRecovery::prepare() {
144 144
 /**
145 145
  * Save the current machine state to the power-loss recovery file
146 146
  */
147
-void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/) {
147
+void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POWER_LOSS_ZRAISE*/, const bool raised/*=false*/) {
148 148
 
149 149
   // We don't check IS_SD_PRINTING here so a save may occur during a pause
150 150
 
@@ -181,14 +181,12 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
181 181
     info.current_position = current_position;
182 182
     info.feedrate = uint16_t(MMS_TO_MMM(feedrate_mm_s));
183 183
     info.zraise = zraise;
184
+    info.flag.raised = raised;                      // Was Z raised before power-off?
184 185
 
185 186
     TERN_(GCODE_REPEAT_MARKERS, info.stored_repeat = repeat);
186 187
     TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset);
187 188
     TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
188
-
189
-    #if HAS_MULTI_EXTRUDER
190
-      info.active_extruder = active_extruder;
191
-    #endif
189
+    TERN_(HAS_MULTI_EXTRUDER, info.active_extruder = active_extruder);
192 190
 
193 191
     #if DISABLED(NO_VOLUMETRICS)
194 192
       info.flag.volumetric_enabled = parser.volumetric_enabled;
@@ -289,8 +287,9 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
289 287
       constexpr float zraise = 0;
290 288
     #endif
291 289
 
292
-    // Save, including the limited Z raise
293
-    if (IS_SD_PRINTING()) save(true, zraise);
290
+    // Save the current position, distance that Z was (or should be) raised,
291
+    // and a flag whether the raise was already done here.
292
+    if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY));
294 293
 
295 294
     // Disable all heaters to reduce power loss
296 295
     thermalManager.disable_all_heaters();
@@ -350,10 +349,10 @@ void PrintJobRecovery::resume() {
350 349
     }
351 350
   #endif
352 351
 
353
-  // Restore all hotend temperatures
352
+  // Heat hotend enough to soften material
354 353
   #if HAS_HOTEND
355 354
     HOTEND_LOOP() {
356
-      const celsius_t et = info.target_temperature[e];
355
+      const celsius_t et = _MAX(info.target_temperature[e], 180);
357 356
       if (et) {
358 357
         #if HAS_MULTI_HOTEND
359 358
           sprintf_P(cmd, PSTR("T%iS"), e);
@@ -365,37 +364,59 @@ void PrintJobRecovery::resume() {
365 364
     }
366 365
   #endif
367 366
 
367
+  // Interpret the saved Z according to flags
368
+  const float z_print = info.current_position.z,
369
+              z_raised = z_print + info.zraise;
370
+
368 371
   //
369 372
   // Home the axes that can safely be homed, and
370 373
   // establish the current position as best we can.
371 374
   //
375
+
376
+  gcode.process_subcommands_now_P(PSTR("G92.9E0")); // Reset E to 0
377
+
372 378
   #if Z_HOME_DIR > 0
373 379
 
374
-    // If Z homing goes to max...
380
+    float z_now = z_raised;
381
+
382
+    // If Z homing goes to max then just move back to the "raised" position
375 383
     gcode.process_subcommands_now_P(PSTR(
376
-      "G92.9 E0\n"                          // Reset E to 0
377
-      "G28R0"                               // Home all axes (no raise)
378
-    ));
384
+        "G28R0\n"     // Home all axes (no raise)
385
+        "G1Z%sF1200"  // Move Z down to (raised) height
386
+      ),
387
+      dtostrf(z_now, 1, 3, str_1)
388
+    );
379 389
 
380 390
   #else
381 391
 
382
-    // If a Z raise occurred at outage restore Z, otherwise raise Z now
383
-    sprintf_P(cmd, PSTR("G92.9 E0 " TERN(BACKUP_POWER_SUPPLY, "Z%s", "Z0\nG1Z%s")), dtostrf(info.zraise, 1, 3, str_1));
384
-    gcode.process_subcommands_now(cmd);
392
+    #if ENABLED(POWER_LOSS_RECOVER_ZHOME) && defined(POWER_LOSS_ZHOME_POS)
393
+      #define HOMING_Z_DOWN 1
394
+    #else
395
+      #define HOME_XY_ONLY 1
396
+    #endif
385 397
 
386
-    // Home safely with no Z raise
387
-    gcode.process_subcommands_now_P(PSTR(
388
-      "G28R0"                               // No raise during G28
389
-      #if IS_CARTESIAN && (DISABLED(POWER_LOSS_RECOVER_ZHOME) || defined(POWER_LOSS_ZHOME_POS))
390
-        "XY"                                // Don't home Z on Cartesian unless overridden
391
-      #endif
392
-    ));
398
+    float z_now = info.flag.raised ? z_raised : z_print;
399
+
400
+    // Reset E to 0 and set Z to the real position
401
+    #if HOME_XY_ONLY
402
+      sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1));
403
+      gcode.process_subcommands_now(cmd);
404
+    #endif
405
+
406
+    // Does Z need to be raised now? It should be raised before homing XY.
407
+    if (z_raised > z_now) {
408
+      z_now = z_raised;
409
+      sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
410
+      gcode.process_subcommands_now(cmd);
411
+    }
412
+
413
+    // Home XY with no Z raise, and also home Z here if Z isn't homing down below.
414
+    gcode.process_subcommands_now_P(PSTR("G28R0" TERN_(HOME_XY_ONLY, "XY"))); // No raise during G28
393 415
 
394 416
   #endif
395 417
 
396
-  #if ENABLED(POWER_LOSS_RECOVER_ZHOME) && defined(POWER_LOSS_ZHOME_POS)
397
-    // Move to a safe XY position where Z can home while avoiding the print.
398
-    // If Z_SAFE_HOMING is enabled, its position must also be outside the print area!
418
+  #if HOMING_Z_DOWN
419
+    // Move to a safe XY position and home Z while avoiding the print.
399 420
     constexpr xy_pos_t p = POWER_LOSS_ZHOME_POS;
400 421
     sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28Z"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
401 422
     gcode.process_subcommands_now(cmd);
@@ -404,9 +425,24 @@ void PrintJobRecovery::resume() {
404 425
   // Mark all axes as having been homed (no effect on current_position)
405 426
   set_all_homed();
406 427
 
428
+  #if HAS_LEVELING
429
+    // Restore Z fade and possibly re-enable bed leveling compensation.
430
+    // Leveling may already be enabled due to the ENABLE_LEVELING_AFTER_G28 option.
431
+    // TODO: Add a G28 parameter to leave leveling disabled.
432
+    sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1));
433
+    gcode.process_subcommands_now(cmd);
434
+
435
+    #if HOME_XY_ONLY
436
+      // The physical Z was adjusted at power-off so undo the M420S1 correction to Z with G92.9.
437
+      sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 1, str_1));
438
+      gcode.process_subcommands_now(cmd);
439
+    #endif
440
+  #endif
441
+
407 442
   #if ENABLED(POWER_LOSS_RECOVER_ZHOME)
408
-    // Z was homed. Now move Z back up to the saved Z height, plus the POWER_LOSS_ZRAISE.
409
-    sprintf_P(cmd, PSTR("G1Z%sF500"), dtostrf(info.current_position.z + POWER_LOSS_ZRAISE, 1, 3, str_1));
443
+    // Z was homed down to the bed, so move up to the raised height.
444
+    z_now = z_raised;
445
+    sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
410 446
     gcode.process_subcommands_now(cmd);
411 447
   #endif
412 448
 
@@ -429,8 +465,23 @@ void PrintJobRecovery::resume() {
429 465
     #endif
430 466
   #endif
431 467
 
432
-  // Select the previously active tool (with no_move)
433
-  #if HAS_MULTI_EXTRUDER
468
+  // Restore all hotend temperatures
469
+  #if HAS_HOTEND
470
+    HOTEND_LOOP() {
471
+      const celsius_t et = info.target_temperature[e];
472
+      if (et) {
473
+        #if HAS_MULTI_HOTEND
474
+          sprintf_P(cmd, PSTR("T%iS"), e);
475
+          gcode.process_subcommands_now(cmd);
476
+        #endif
477
+        sprintf_P(cmd, PSTR("M109S%i"), et);
478
+        gcode.process_subcommands_now(cmd);
479
+      }
480
+    }
481
+  #endif
482
+
483
+  // Restore the previously active tool (with no_move)
484
+  #if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND
434 485
     sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
435 486
     gcode.process_subcommands_now(cmd);
436 487
   #endif
@@ -457,15 +508,6 @@ void PrintJobRecovery::resume() {
457 508
     fwretract.current_hop = info.retract_hop;
458 509
   #endif
459 510
 
460
-  #if HAS_LEVELING
461
-    // Restore leveling state before 'G92 Z' to ensure
462
-    // the Z stepper count corresponds to the native Z.
463
-    if (info.fade || info.flag.leveling) {
464
-      sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1));
465
-      gcode.process_subcommands_now(cmd);
466
-    }
467
-  #endif
468
-
469 511
   #if ENABLED(GRADIENT_MIX)
470 512
     memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient));
471 513
   #endif
@@ -492,14 +534,8 @@ void PrintJobRecovery::resume() {
492 534
   );
493 535
   gcode.process_subcommands_now(cmd);
494 536
 
495
-  // Move back to the saved Z
496
-  dtostrf(info.current_position.z, 1, 3, str_1);
497
-  #if Z_HOME_DIR > 0 || ENABLED(POWER_LOSS_RECOVER_ZHOME)
498
-    sprintf_P(cmd, PSTR("G1 Z%s F500"), str_1);
499
-  #else
500
-    gcode.process_subcommands_now_P(PSTR("G1 Z0 F200"));
501
-    sprintf_P(cmd, PSTR("G92.9 Z%s"), str_1);
502
-  #endif
537
+  // Move back down to the saved Z for printing
538
+  sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1));
503 539
   gcode.process_subcommands_now(cmd);
504 540
 
505 541
   // Restore the feedrate
@@ -552,7 +588,15 @@ void PrintJobRecovery::resume() {
552 588
         }
553 589
         DEBUG_EOL();
554 590
 
555
-        DEBUG_ECHOLNPAIR("zraise: ", info.zraise);
591
+        DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
592
+
593
+        DEBUG_ECHOLNPAIR("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
594
+
595
+        #if ENABLED(GCODE_REPEAT_MARKERS)
596
+          DEBUG_ECHOLNPAIR("repeat index: ", info.stored_repeat.index);
597
+          LOOP_L_N(i, info.stored_repeat.index)
598
+            DEBUG_ECHOLNPAIR("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
599
+        #endif
556 600
 
557 601
         #if HAS_HOME_OFFSET
558 602
           DEBUG_ECHOPGM("home_offset: ");
@@ -572,12 +616,16 @@ void PrintJobRecovery::resume() {
572 616
           DEBUG_EOL();
573 617
         #endif
574 618
 
575
-        DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
576
-
577 619
         #if HAS_MULTI_EXTRUDER
578 620
           DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder);
579 621
         #endif
580 622
 
623
+        #if DISABLED(NO_VOLUMETRICS)
624
+          DEBUG_ECHOPGM("filament_size:");
625
+          LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPAIR(" ", info.filament_size[i]);
626
+          DEBUG_EOL();
627
+        #endif
628
+
581 629
         #if HAS_HOTEND
582 630
           DEBUG_ECHOPGM("target_temperature: ");
583 631
           HOTEND_LOOP() {
@@ -601,8 +649,9 @@ void PrintJobRecovery::resume() {
601 649
         #endif
602 650
 
603 651
         #if HAS_LEVELING
604
-          DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling, " fade: ", info.fade);
652
+          DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling ? "ON" : "OFF", "  fade: ", info.fade);
605 653
         #endif
654
+
606 655
         #if ENABLED(FWRETRACT)
607 656
           DEBUG_ECHOPGM("retract: ");
608 657
           for (int8_t e = 0; e < EXTRUDERS; e++) {
@@ -612,11 +661,28 @@ void PrintJobRecovery::resume() {
612 661
           DEBUG_EOL();
613 662
           DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop);
614 663
         #endif
664
+
665
+        // Mixing extruder and gradient
666
+        #if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
667
+          DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF");
668
+        #endif
669
+
615 670
         DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename);
616 671
         DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos);
617 672
         DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed);
618
-        DEBUG_ECHOLNPAIR("dryrun: ", AS_DIGIT(info.flag.dryrun));
619
-        DEBUG_ECHOLNPAIR("allow_cold_extrusion: ", info.flag.allow_cold_extrusion);
673
+
674
+        DEBUG_ECHOPGM("axis_relative:");
675
+        if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X");
676
+        if (TEST(info.axis_relative, REL_Y)) DEBUG_ECHOPGM(" REL_Y");
677
+        if (TEST(info.axis_relative, REL_Z)) DEBUG_ECHOPGM(" REL_Z");
678
+        if (TEST(info.axis_relative, REL_E)) DEBUG_ECHOPGM(" REL_E");
679
+        if (TEST(info.axis_relative, E_MODE_ABS)) DEBUG_ECHOPGM(" E_MODE_ABS");
680
+        if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL");
681
+        DEBUG_EOL();
682
+
683
+        DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
684
+        DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
685
+        DEBUG_ECHOLNPAIR("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
620 686
       }
621 687
       else
622 688
         DEBUG_ECHOLNPGM("INVALID DATA");

+ 2
- 1
Marlin/src/feature/powerloss.h Переглянути файл

@@ -117,6 +117,7 @@ typedef struct {
117 117
 
118 118
   // Misc. Marlin flags
119 119
   struct {
120
+    bool raised:1;                // Raised before saved
120 121
     bool dryrun:1;                // M111 S8
121 122
     bool allow_cold_extrusion:1;  // M302 P1
122 123
     #if ENABLED(HAS_LEVELING)
@@ -182,7 +183,7 @@ class PrintJobRecovery {
182 183
     static inline void cancel() { purge(); IF_DISABLED(NO_SD_AUTOSTART, card.autofile_begin()); }
183 184
 
184 185
     static void load();
185
-    static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=0);
186
+    static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=POWER_LOSS_ZRAISE, const bool raised=false);
186 187
 
187 188
     #if PIN_EXISTS(POWER_LOSS)
188 189
       static inline void outage() {

+ 0
- 2
Marlin/src/gcode/feature/pause/M125.cpp Переглянути файл

@@ -78,8 +78,6 @@ void GcodeSuite::M125() {
78 78
   // If possible, show an LCD prompt with the 'P' flag
79 79
   const bool show_lcd = TERN0(HAS_LCD_MENU, parser.boolval('P'));
80 80
 
81
-  TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
82
-
83 81
   if (pause_print(retract, park_point, show_lcd, 0)) {
84 82
     if (ENABLED(EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) {
85 83
       wait_for_confirmation(false, 0);

+ 1
- 1
Marlin/src/gcode/sd/M24_M25.cpp Переглянути файл

@@ -105,7 +105,7 @@ void GcodeSuite::M25() {
105 105
       if (IS_SD_PRINTING()) card.pauseSDPrint();
106 106
     #endif
107 107
 
108
-    #if ENABLED(POWER_LOSS_RECOVERY)
108
+    #if ENABLED(POWER_LOSS_RECOVERY) && DISABLED(DGUS_LCD_UI_MKS)
109 109
       if (recovery.enabled) recovery.save(true);
110 110
     #endif
111 111
 

+ 2
- 0
Marlin/src/inc/SanityCheck.h Переглянути файл

@@ -2903,6 +2903,8 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2903 2903
     #error "POWER_LOSS_RECOVER_ZHOME cannot be used with Z_SAFE_HOMING."
2904 2904
   #elif BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN)
2905 2905
     #error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time."
2906
+  #elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_DIR > 0
2907
+    #error "POWER_LOSS_RECOVER_ZHOME is not needed on a machine that homes to ZMAX."
2906 2908
   #elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_DIR < 0 && !defined(POWER_LOSS_ZHOME_POS)
2907 2909
     #error "POWER_LOSS_RECOVER_ZHOME requires POWER_LOSS_ZHOME_POS for a Cartesian that homes to ZMIN."
2908 2910
   #endif

+ 10
- 0
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp Переглянути файл

@@ -39,6 +39,10 @@
39 39
   #include "../../../../module/stepper/trinamic.h"
40 40
 #endif
41 41
 
42
+#if ENABLED(POWER_LOSS_RECOVERY)
43
+  #include "../../../../../feature/powerloss.h"
44
+#endif
45
+
42 46
 #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
43 47
   uint16_t distanceToMove = 10;
44 48
 #endif
@@ -78,8 +82,13 @@ constexpr feedRate_t park_speed_xy = TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_XY_FE
78 82
 void MKS_pause_print_move() {
79 83
   queue.exhaust();
80 84
   position_before_pause = current_position;
85
+
86
+  // Save the current position, the raise amount, and 'already raised'
87
+  TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true, mks_park_pos.z, true));
88
+
81 89
   destination.z = _MIN(current_position.z + mks_park_pos.z, Z_MAX_POS);
82 90
   prepare_internal_move_to_destination(park_speed_z);
91
+
83 92
   destination.set(X_MIN_POS + mks_park_pos.x, Y_MIN_POS + mks_park_pos.y);
84 93
   prepare_internal_move_to_destination(park_speed_xy);
85 94
 }
@@ -89,6 +98,7 @@ void MKS_resume_print_move() {
89 98
   prepare_internal_move_to_destination(park_speed_xy);
90 99
   destination.z = position_before_pause.z;
91 100
   prepare_internal_move_to_destination(park_speed_z);
101
+  TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
92 102
 }
93 103
 
94 104
 float z_offset_add = 0;

+ 4
- 4
buildroot/tests/rambo Переглянути файл

@@ -14,9 +14,9 @@ opt_set MOTHERBOARD BOARD_RAMBO \
14 14
         EXTRUDERS 2 TEMP_SENSOR_0 -2 TEMP_SENSOR_1 1 TEMP_SENSOR_BED 2 \
15 15
         TEMP_SENSOR_PROBE 1 TEMP_PROBE_PIN 12 \
16 16
         TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 3 HEATER_CHAMBER_PIN 45 \
17
-        Z_HOME_DIR 1 GRID_MAX_POINTS_X 16 \
17
+        GRID_MAX_POINTS_X 16 \
18 18
         FANMUX0_PIN 53
19
-opt_disable USE_ZMIN_PLUG Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG
19
+opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG
20 20
 opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \
21 21
            FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PROBE_TEMP_COMPENSATION \
22 22
            PREHEAT_BEFORE_PROBING PROBING_HEATERS_OFF PROBING_FANS_OFF PROBING_STEPPERS_OFF WAIT_FOR_BED_HEATER \
@@ -32,7 +32,7 @@ opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_P
32 32
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
33 33
            BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
34 34
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
35
-           PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE POWER_LOSS_RECOVER_ZHOME \
35
+           PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE POWER_LOSS_RECOVER_ZHOME POWER_LOSS_ZHOME_POS \
36 36
            SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE EXTRA_LIN_ADVANCE_K \
37 37
            HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
38 38
 opt_add DEBUG_POWER_LOSS_RECOVERY
@@ -43,7 +43,7 @@ exec_test $1 $2 "RAMBO | EXTRUDERS 2 | CHAR LCD + SD | FIX Probe | ABL-Linear |
43 43
 #
44 44
 restore_configs
45 45
 opt_set MOTHERBOARD BOARD_RAMBO \
46
-        EXTRUDERS 0 TEMP_SENSOR_0 999 DUMMY_THERMISTOR_999_VALUE 170 \
46
+        EXTRUDERS 0 TEMP_SENSOR_0 999 DUMMY_THERMISTOR_999_VALUE 170 Z_HOME_DIR 1 \
47 47
         DIGIPOT_MOTOR_CURRENT '{ 120, 120, 120, 120, 120 }' \
48 48
         LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }'
49 49
 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \

Завантаження…
Відмінити
Зберегти