0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-02-16 22:37:35 +00:00
This commit is contained in:
Scott Lahteine 2024-03-16 13:51:55 -05:00
parent 56e9393ed3
commit d2742835f3
4 changed files with 7 additions and 7 deletions

View file

@ -1747,7 +1747,7 @@
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_ENABLED_DEFAULT false // Power-Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) #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_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 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. //#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.

View file

@ -364,11 +364,9 @@ void PrintJobRecovery::write() {
} }
#if ENABLED(PLR_HEAT_BED_ON_REBOOT) #if ENABLED(PLR_HEAT_BED_ON_REBOOT)
void PrintJobRecovery::set_bed_temp(bool turn_on) { void PrintJobRecovery::set_bed_temp(const bool on) {
// Set the bed temperature PROCESS_SUBCOMMANDS_NOW(TS(F("M190S"), on ? info.target_temperature_bed + PLR_HEAT_BED_EXTRA : 0));
const celsius_t bt = turn_on ? info.target_temperature_bed + PLR_HEAT_BED_RAISE: 0; }
PROCESS_SUBCOMMANDS_NOW(TS(F("M190S"), bt));
}
#endif #endif
/** /**

View file

@ -192,7 +192,7 @@ class PrintJobRecovery {
static bool check(); static bool check();
#if ENABLED(PLR_HEAT_BED_ON_REBOOT) #if ENABLED(PLR_HEAT_BED_ON_REBOOT)
static void set_bed_temp(bool turn_on); static void set_bed_temp(bool turn_on);
#endif #endif
static void resume(); static void resume();
static void purge(); static void purge();

View file

@ -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)); 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')) { if (!force_resume && parser.seen_test('S')) {
TERN_(PLR_HEAT_BED_ON_REBOOT, recovery.set_bed_temp(true)); TERN_(PLR_HEAT_BED_ON_REBOOT, recovery.set_bed_temp(true));
#if HAS_MARLINUI_MENU #if HAS_MARLINUI_MENU
ui.goto_screen(menu_job_recovery); ui.goto_screen(menu_job_recovery);
#elif HAS_DWIN_E3V2_BASIC #elif HAS_DWIN_E3V2_BASIC