From 40aff7e1f2f56b5cef8ad50d7789ae1fd7ff7852 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed, 8 May 2019 04:02:08 +0200 Subject: [PATCH] Remove extra MMU (non-12V) code (#13938) `check_version` in state -5 should not be needed since it has already been called in state -4 and the tested build nr is only updated in state -4. --- Marlin/src/feature/prusa_MMU2/mmu2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp index 7d0e6fcfd..b3eb60bf5 100644 --- a/Marlin/src/feature/prusa_MMU2/mmu2.cpp +++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp @@ -202,19 +202,19 @@ void MMU2::mmu_loop() { } break; + #if ENABLED(MMU2_MODE_12V) case -5: // response to M1 if (rx_ok()) { DEBUG_ECHOLNPGM("MMU => ok"); - check_version(); - DEBUG_ECHOLNPGM("MMU <= 'P0'"); tx_str_P(PSTR("P0\n")); // read finda state = -4; } break; + #endif case -4: if (rx_ok()) { @@ -302,7 +302,7 @@ void MMU2::mmu_loop() { if (!finda && finda_runout_valid) filament_runout(); } - else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (30s) + else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (3s) state = 1; break;