소스 검색

Fix compile with PLR, no fan (#20096)

ellensp 4 년 전
부모
커밋
7216b8f804
No account linked to committer's email address
1개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 8
    6
      Marlin/src/feature/powerloss.cpp

+ 8
- 6
Marlin/src/feature/powerloss.cpp 파일 보기

@@ -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…
취소
저장