Browse Source

Default on/off for Power Loss Recovery (#17051)

InsanityAutomation 4 years ago
parent
commit
552f7a91d0
No account linked to committer's email address

+ 4
- 0
Marlin/Configuration_adv.h View File

@@ -1039,9 +1039,13 @@
1039 1039
    * during SD printing. If the recovery file is found at boot time, present
1040 1040
    * an option on the LCD screen to continue the print from the last-known
1041 1041
    * point in the file.
1042
+   *
1043
+   * If the machine reboots when resuming a print you may need to replace or
1044
+   * reformat the SD card. (Bad sectors delay startup triggering the watchdog.)
1042 1045
    */
1043 1046
   //#define POWER_LOSS_RECOVERY
1044 1047
   #if ENABLED(POWER_LOSS_RECOVERY)
1048
+    //#define PLR_ENABLED_DEFAULT  true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
1045 1049
     //#define BACKUP_POWER_SUPPLY       // Backup power / UPS to move the steppers on power loss
1046 1050
     //#define POWER_LOSS_ZRAISE       2 // (mm) Z axis raise on resume (on power loss with UPS)
1047 1051
     //#define POWER_LOSS_PIN         44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.

+ 4
- 0
Marlin/src/inc/Conditionals_adv.h View File

@@ -65,6 +65,10 @@
65 65
   #define NUM_Z_STEPPER_DRIVERS 1
66 66
 #endif
67 67
 
68
+#ifndef PLR_ENABLED_DEFAULT
69
+  #define PLR_ENABLED_DEFAULT true
70
+#endif
71
+
68 72
 #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
69 73
   #undef Z_STEPPER_ALIGN_AMP
70 74
 #endif

+ 2
- 2
Marlin/src/module/configuration_store.cpp View File

@@ -930,7 +930,7 @@ void MarlinSettings::postprocess() {
930 930
         #if ENABLED(POWER_LOSS_RECOVERY)
931 931
           recovery.enabled
932 932
         #else
933
-          true
933
+          PLR_ENABLED_DEFAULT
934 934
         #endif
935 935
       ;
936 936
       EEPROM_WRITE(recovery_enabled);
@@ -2670,7 +2670,7 @@ void MarlinSettings::reset() {
2670 2670
   //
2671 2671
 
2672 2672
   #if ENABLED(POWER_LOSS_RECOVERY)
2673
-    recovery.enable(true);
2673
+    recovery.enable(PLR_ENABLED_DEFAULT);
2674 2674
   #endif
2675 2675
 
2676 2676
   //

Loading…
Cancel
Save