Browse Source

Fix compile of MMU2 with S-mode disabled (#19584)

ellensp 4 years ago
parent
commit
2e1ba73926
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/feature/mmu2/mmu2.cpp

+ 4
- 4
Marlin/src/feature/mmu2/mmu2.cpp View File

340
       #endif
340
       #endif
341
 
341
 
342
       if (rx_ok()) {
342
       if (rx_ok()) {
343
-        // response to C0 mmu command in PRUSA_MMU2_S_MODE
343
+        // Response to C0 mmu command in PRUSA_MMU2_S_MODE
344
         bool can_reset = true;
344
         bool can_reset = true;
345
-        if (ENABLED(PRUSA_MMU2_S_MODE) && last_cmd == MMU_CMD_C0) {
346
-          if (!mmu2s_triggered) {
345
+        #if ENABLED(PRUSA_MMU2_S_MODE)
346
+          if (!mmu2s_triggered && last_cmd == MMU_CMD_C0) {
347
             can_reset = false;
347
             can_reset = false;
348
             // MMU ok received but filament sensor not triggered, retrying...
348
             // MMU ok received but filament sensor not triggered, retrying...
349
             DEBUG_ECHOLNPGM("MMU => 'ok' (filament not present in gears)");
349
             DEBUG_ECHOLNPGM("MMU => 'ok' (filament not present in gears)");
350
             DEBUG_ECHOLNPGM("MMU <= 'C0' (keep trying)");
350
             DEBUG_ECHOLNPGM("MMU <= 'C0' (keep trying)");
351
             MMU2_COMMAND("C0");
351
             MMU2_COMMAND("C0");
352
           }
352
           }
353
-        }
353
+        #endif
354
         if (can_reset) {
354
         if (can_reset) {
355
           DEBUG_ECHOLNPGM("MMU => 'ok'");
355
           DEBUG_ECHOLNPGM("MMU => 'ok'");
356
           ready = true;
356
           ready = true;

Loading…
Cancel
Save