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.
This commit is contained in:
Giuliano Zaro 2019-05-08 04:02:08 +02:00 committed by Scott Lahteine
parent 059269d732
commit 40aff7e1f2

View file

@ -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;