diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8c33eaee0e..5da26ad7e4 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1747,7 +1747,7 @@ #if ENABLED(POWER_LOSS_RECOVERY) #define PLR_ENABLED_DEFAULT false // Power-Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define PLR_HEAT_BED_ON_REBOOT // Turn on bed heating immediatly after reboot to mitigate object detaching/warping. - //#define PLR_HEAT_BED_RAISE 0 //(°C) Raise bed temperature by this value improve adhesion after restart (limited by maximum allowed temperature). + //#define PLR_HEAT_BED_EXTRA 0 // (°C) Relative increase of bed temperature for better adhesion (limited by max temp). //#define PLR_BED_THRESHOLD BED_MAXTEMP // (°C) Skip user confirmation at or above this bed temperature (0 to disable) //#define POWER_LOSS_PIN 44 // Pin to detect power-loss. Set to -1 to disable default pin on boards without module, or comment to use board default. diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 8d601bc20d..27720c37cc 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -364,11 +364,9 @@ void PrintJobRecovery::write() { } #if ENABLED(PLR_HEAT_BED_ON_REBOOT) -void PrintJobRecovery::set_bed_temp(bool turn_on) { - // Set the bed temperature - const celsius_t bt = turn_on ? info.target_temperature_bed + PLR_HEAT_BED_RAISE: 0; - PROCESS_SUBCOMMANDS_NOW(TS(F("M190S"), bt)); -} + void PrintJobRecovery::set_bed_temp(const bool on) { + PROCESS_SUBCOMMANDS_NOW(TS(F("M190S"), on ? info.target_temperature_bed + PLR_HEAT_BED_EXTRA : 0)); + } #endif /** diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index 11eb225c31..6512b870e1 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -192,7 +192,7 @@ class PrintJobRecovery { static bool check(); #if ENABLED(PLR_HEAT_BED_ON_REBOOT) static void set_bed_temp(bool turn_on); - #endif + #endif static void resume(); static void purge(); diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index a476e7cf2e..54ed26a1d0 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -74,7 +74,9 @@ void GcodeSuite::M1000() { const bool force_resume = TERN0(HAS_PLR_BED_THRESHOLD, recovery.bed_temp_threshold && (thermalManager.degBed() >= recovery.bed_temp_threshold)); if (!force_resume && parser.seen_test('S')) { + TERN_(PLR_HEAT_BED_ON_REBOOT, recovery.set_bed_temp(true)); + #if HAS_MARLINUI_MENU ui.goto_screen(menu_job_recovery); #elif HAS_DWIN_E3V2_BASIC