Browse Source

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.
pull/1/head
Giuliano Zaro 6 years ago
committed by Scott Lahteine
parent
commit
40aff7e1f2
  1. 6
      Marlin/src/feature/prusa_MMU2/mmu2.cpp

6
Marlin/src/feature/prusa_MMU2/mmu2.cpp

@ -202,19 +202,19 @@ void MMU2::mmu_loop() {
} }
break; break;
#if ENABLED(MMU2_MODE_12V)
case -5: case -5:
// response to M1 // response to M1
if (rx_ok()) { if (rx_ok()) {
DEBUG_ECHOLNPGM("MMU => ok"); DEBUG_ECHOLNPGM("MMU => ok");
check_version();
DEBUG_ECHOLNPGM("MMU <= 'P0'"); DEBUG_ECHOLNPGM("MMU <= 'P0'");
tx_str_P(PSTR("P0\n")); // read finda tx_str_P(PSTR("P0\n")); // read finda
state = -4; state = -4;
} }
break; break;
#endif
case -4: case -4:
if (rx_ok()) { if (rx_ok()) {
@ -302,7 +302,7 @@ void MMU2::mmu_loop() {
if (!finda && finda_runout_valid) filament_runout(); 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; state = 1;
break; break;

Loading…
Cancel
Save