@@ -444,6 +444,7 @@ typedef struct SettingsDataStruct {
444
444
// POWER_LOSS_RECOVERY
445
445
//
446
446
bool recovery_enabled; // M413 S
447
+ celsius_t bed_temp_threshold; // M413 B
447
448
448
449
//
449
450
// FWRETRACT
@@ -1268,8 +1269,10 @@ void MarlinSettings::postprocess() {
1268
1269
//
1269
1270
{
1270
1271
_FIELD_TEST (recovery_enabled);
1271
- const bool recovery_enabled = TERN (POWER_LOSS_RECOVERY, recovery.enabled , ENABLED (PLR_ENABLED_DEFAULT));
1272
+ const bool recovery_enabled = TERN0 (POWER_LOSS_RECOVERY, recovery.enabled );
1273
+ const celsius_t bed_temp_threshold = TERN0 (HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold );
1272
1274
EEPROM_WRITE (recovery_enabled);
1275
+ EEPROM_WRITE (bed_temp_threshold);
1273
1276
}
1274
1277
1275
1278
//
@@ -2310,10 +2313,15 @@ void MarlinSettings::postprocess() {
2310
2313
// Power-Loss Recovery
2311
2314
//
2312
2315
{
2313
- bool recovery_enabled;
2314
2316
_FIELD_TEST (recovery_enabled);
2317
+ bool recovery_enabled;
2318
+ celsius_t bed_temp_threshold;
2315
2319
EEPROM_READ (recovery_enabled);
2316
- TERN_ (POWER_LOSS_RECOVERY, if (!validating) recovery.enabled = recovery_enabled);
2320
+ EEPROM_READ (bed_temp_threshold);
2321
+ if (!validating) {
2322
+ TERN_ (POWER_LOSS_RECOVERY, recovery.enabled = recovery_enabled);
2323
+ TERN_ (HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold = bed_temp_threshold);
2324
+ }
2317
2325
}
2318
2326
2319
2327
//
@@ -3460,7 +3468,10 @@ void MarlinSettings::reset() {
3460
3468
//
3461
3469
// Power-Loss Recovery
3462
3470
//
3463
- TERN_ (POWER_LOSS_RECOVERY, recovery.enable (ENABLED (PLR_ENABLED_DEFAULT)));
3471
+ #if ENABLED(POWER_LOSS_RECOVERY)
3472
+ recovery.enable (ENABLED (PLR_ENABLED_DEFAULT));
3473
+ TERN_ (HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold = PLR_BED_THRESHOLD);
3474
+ #endif
3464
3475
3465
3476
//
3466
3477
// Firmware Retraction
0 commit comments