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
    * during SD printing. If the recovery file is found at boot time, present
1039
    * during SD printing. If the recovery file is found at boot time, present
1040
    * an option on the LCD screen to continue the print from the last-known
1040
    * an option on the LCD screen to continue the print from the last-known
1041
    * point in the file.
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
   //#define POWER_LOSS_RECOVERY
1046
   //#define POWER_LOSS_RECOVERY
1044
   #if ENABLED(POWER_LOSS_RECOVERY)
1047
   #if ENABLED(POWER_LOSS_RECOVERY)
1048
+    //#define PLR_ENABLED_DEFAULT  true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
1045
     //#define BACKUP_POWER_SUPPLY       // Backup power / UPS to move the steppers on power loss
1049
     //#define BACKUP_POWER_SUPPLY       // Backup power / UPS to move the steppers on power loss
1046
     //#define POWER_LOSS_ZRAISE       2 // (mm) Z axis raise on resume (on power loss with UPS)
1050
     //#define POWER_LOSS_ZRAISE       2 // (mm) Z axis raise on resume (on power loss with UPS)
1047
     //#define POWER_LOSS_PIN         44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
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
   #define NUM_Z_STEPPER_DRIVERS 1
65
   #define NUM_Z_STEPPER_DRIVERS 1
66
 #endif
66
 #endif
67
 
67
 
68
+#ifndef PLR_ENABLED_DEFAULT
69
+  #define PLR_ENABLED_DEFAULT true
70
+#endif
71
+
68
 #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
72
 #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
69
   #undef Z_STEPPER_ALIGN_AMP
73
   #undef Z_STEPPER_ALIGN_AMP
70
 #endif
74
 #endif

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

930
         #if ENABLED(POWER_LOSS_RECOVERY)
930
         #if ENABLED(POWER_LOSS_RECOVERY)
931
           recovery.enabled
931
           recovery.enabled
932
         #else
932
         #else
933
-          true
933
+          PLR_ENABLED_DEFAULT
934
         #endif
934
         #endif
935
       ;
935
       ;
936
       EEPROM_WRITE(recovery_enabled);
936
       EEPROM_WRITE(recovery_enabled);
2670
   //
2670
   //
2671
 
2671
 
2672
   #if ENABLED(POWER_LOSS_RECOVERY)
2672
   #if ENABLED(POWER_LOSS_RECOVERY)
2673
-    recovery.enable(true);
2673
+    recovery.enable(PLR_ENABLED_DEFAULT);
2674
   #endif
2674
   #endif
2675
 
2675
 
2676
   //
2676
   //

Loading…
Cancel
Save