Pārlūkot izejas kodu

Fix compile with PLR, no fan (#20096)

ellensp 3 gadus atpakaļ
vecāks
revīzija
7216b8f804
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 8 papildinājumiem un 6 dzēšanām
  1. 8
    6
      Marlin/src/feature/powerloss.cpp

+ 8
- 6
Marlin/src/feature/powerloss.cpp Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt