🚸 PLR recover chamber temp (#26696)

This commit is contained in:
ellensp 2024-01-25 09:33:02 +13:00 committed by GitHub
parent ed1391ee5d
commit 97546bf55b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -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_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)); TERN_(HAS_FAN, COPY(info.fan_speed, thermalManager.fan_speed));
#if HAS_LEVELING #if HAS_LEVELING
@ -383,6 +385,12 @@ void PrintJobRecovery::resume() {
PROCESS_SUBCOMMANDS_NOW(F("M420S0")); PROCESS_SUBCOMMANDS_NOW(F("M420S0"));
#endif #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 #if HAS_HEATED_BED
// Restore the bed temperature // Restore the bed temperature
const celsius_t bt = info.target_temperature_bed; const celsius_t bt = info.target_temperature_bed;
@ -633,6 +641,10 @@ void PrintJobRecovery::resume() {
DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed); DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed);
#endif #endif
#if HAS_HEATED_CHAMBER
DEBUG_ECHOLNPGM("target_temperature_chamber: ", info.target_temperature_chamber);
#endif
#if HAS_FAN #if HAS_FAN
DEBUG_ECHOPGM("fan_speed: "); DEBUG_ECHOPGM("fan_speed: ");
FANS_LOOP(i) { FANS_LOOP(i) {

View file

@ -87,6 +87,9 @@ typedef struct {
#if HAS_HEATED_BED #if HAS_HEATED_BED
celsius_t target_temperature_bed; celsius_t target_temperature_bed;
#endif #endif
#if HAS_HEATED_CHAMBER
celsius_t target_temperature_chamber;
#endif
#if HAS_FAN #if HAS_FAN
uint8_t fan_speed[FAN_COUNT]; uint8_t fan_speed[FAN_COUNT];
#endif #endif