Skip to content

Commit

Permalink
Default on/off for Power Loss Recovery (#17051)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation authored Mar 2, 2020
1 parent ad4a9eb commit 552f7a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,13 @@
* 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
* 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
#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 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.
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
#define NUM_Z_STEPPER_DRIVERS 1
#endif

#ifndef PLR_ENABLED_DEFAULT
#define PLR_ENABLED_DEFAULT true
#endif

#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#undef Z_STEPPER_ALIGN_AMP
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/configuration_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.enabled
#else
true
PLR_ENABLED_DEFAULT
#endif
;
EEPROM_WRITE(recovery_enabled);
Expand Down Expand Up @@ -2670,7 +2670,7 @@ void MarlinSettings::reset() {
//

#if ENABLED(POWER_LOSS_RECOVERY)
recovery.enable(true);
recovery.enable(PLR_ENABLED_DEFAULT);
#endif

//
Expand Down

0 comments on commit 552f7a9

Please sign in to comment.