Browse Source

Fix compile with PLR, no fan (#20096)

ellensp 4 years ago
parent
commit
7216b8f804
No account linked to committer's email address
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      Marlin/src/feature/powerloss.cpp

+ 8
- 6
Marlin/src/feature/powerloss.cpp View File

@@ -433,13 +433,15 @@ void PrintJobRecovery::resume() {
433 433
   #endif
434 434
 
435 435
   // Restore print cooling fan speeds
436
-  FANS_LOOP(i) {
437
-    uint8_t f = info.fan_speed[i];
438
-    if (f) {
439
-      sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);
440
-      gcode.process_subcommands_now(cmd);
436
+  #if HAS_FAN
437
+    FANS_LOOP(i) {
438
+      const int f = info.fan_speed[i];
439
+      if (f) {
440
+        sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);
441
+        gcode.process_subcommands_now(cmd);
442
+      }
441 443
     }
442
-  }
444
+  #endif
443 445
 
444 446
   // Restore retract and hop state
445 447
   #if ENABLED(FWRETRACT)

Loading…
Cancel
Save