Browse Source

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

vanilla_fb_2.0.x
InsanityAutomation 5 years ago
committed by GitHub
parent
commit
552f7a91d0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/Configuration_adv.h
  2. 4
      Marlin/src/inc/Conditionals_adv.h
  3. 4
      Marlin/src/module/configuration_store.cpp

4
Marlin/Configuration_adv.h

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

4
Marlin/src/inc/Conditionals_adv.h

@ -65,6 +65,10 @@
#define NUM_Z_STEPPER_DRIVERS 1 #define NUM_Z_STEPPER_DRIVERS 1
#endif #endif
#ifndef PLR_ENABLED_DEFAULT
#define PLR_ENABLED_DEFAULT true
#endif
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#undef Z_STEPPER_ALIGN_AMP #undef Z_STEPPER_ALIGN_AMP
#endif #endif

4
Marlin/src/module/configuration_store.cpp

@ -930,7 +930,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
recovery.enabled recovery.enabled
#else #else
true PLR_ENABLED_DEFAULT
#endif #endif
; ;
EEPROM_WRITE(recovery_enabled); EEPROM_WRITE(recovery_enabled);
@ -2670,7 +2670,7 @@ void MarlinSettings::reset() {
// //
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
recovery.enable(true); recovery.enable(PLR_ENABLED_DEFAULT);
#endif #endif
// //

Loading…
Cancel
Save