Skip to content

Commit

Permalink
Fix compile with PLR, no fan (MarlinFirmware#20096)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and W4tel-BiDi committed Apr 5, 2021
1 parent 4ecd436 commit 606ff0b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,15 @@ void PrintJobRecovery::resume() {
#endif

// Restore print cooling fan speeds
FANS_LOOP(i) {
uint8_t f = info.fan_speed[i];
if (f) {
sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);
gcode.process_subcommands_now(cmd);
#if HAS_FAN
FANS_LOOP(i) {
const int f = info.fan_speed[i];
if (f) {
sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);
gcode.process_subcommands_now(cmd);
}
}
}
#endif

// Restore retract and hop state
#if ENABLED(FWRETRACT)
Expand Down

0 comments on commit 606ff0b

Please sign in to comment.