Skip to content

Commit

Permalink
🚸 PLR recover chamber temp (MarlinFirmware#26696)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored Jan 24, 2024
1 parent ed1391e commit 97546bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW

TERN_(HAS_HEATED_BED, info.target_temperature_bed = thermalManager.degTargetBed());

TERN_(HAS_HEATED_CHAMBER, info.target_temperature_chamber = thermalManager.degTargetChamber());

TERN_(HAS_FAN, COPY(info.fan_speed, thermalManager.fan_speed));

#if HAS_LEVELING
Expand Down Expand Up @@ -383,6 +385,12 @@ void PrintJobRecovery::resume() {
PROCESS_SUBCOMMANDS_NOW(F("M420S0"));
#endif

#if HAS_HEATED_CHAMBER
// Restore the chamber temperature
const celsius_t ct = info.target_temperature_chamber;
if (ct) PROCESS_SUBCOMMANDS_NOW(TS(F("M191S"), ct));
#endif

#if HAS_HEATED_BED
// Restore the bed temperature
const celsius_t bt = info.target_temperature_bed;
Expand Down Expand Up @@ -633,6 +641,10 @@ void PrintJobRecovery::resume() {
DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed);
#endif

#if HAS_HEATED_CHAMBER
DEBUG_ECHOLNPGM("target_temperature_chamber: ", info.target_temperature_chamber);
#endif

#if HAS_FAN
DEBUG_ECHOPGM("fan_speed: ");
FANS_LOOP(i) {
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/feature/powerloss.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ typedef struct {
#if HAS_HEATED_BED
celsius_t target_temperature_bed;
#endif
#if HAS_HEATED_CHAMBER
celsius_t target_temperature_chamber;
#endif
#if HAS_FAN
uint8_t fan_speed[FAN_COUNT];
#endif
Expand Down

0 comments on commit 97546bf

Please sign in to comment.