From 2e1ba73926eeac126dd345b32f40c5b5d4804462 Mon Sep 17 00:00:00 2001 From: ellensp Date: Sat, 3 Oct 2020 11:12:17 +1300 Subject: [PATCH] Fix compile of MMU2 with S-mode disabled (#19584) --- Marlin/src/feature/mmu2/mmu2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/feature/mmu2/mmu2.cpp b/Marlin/src/feature/mmu2/mmu2.cpp index 37a2404c33..3d635369e4 100644 --- a/Marlin/src/feature/mmu2/mmu2.cpp +++ b/Marlin/src/feature/mmu2/mmu2.cpp @@ -340,17 +340,17 @@ void MMU2::mmu_loop() { #endif if (rx_ok()) { - // response to C0 mmu command in PRUSA_MMU2_S_MODE + // Response to C0 mmu command in PRUSA_MMU2_S_MODE bool can_reset = true; - if (ENABLED(PRUSA_MMU2_S_MODE) && last_cmd == MMU_CMD_C0) { - if (!mmu2s_triggered) { + #if ENABLED(PRUSA_MMU2_S_MODE) + if (!mmu2s_triggered && last_cmd == MMU_CMD_C0) { can_reset = false; // MMU ok received but filament sensor not triggered, retrying... DEBUG_ECHOLNPGM("MMU => 'ok' (filament not present in gears)"); DEBUG_ECHOLNPGM("MMU <= 'C0' (keep trying)"); MMU2_COMMAND("C0"); } - } + #endif if (can_reset) { DEBUG_ECHOLNPGM("MMU => 'ok'"); ready = true;