1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +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)
#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.

View File

@ -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
/**

View File

@ -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();

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));
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