diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 2a956a85..0106718d 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6797,7 +6797,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) st_synchronize(); for (index = 1; *(strchr_pointer + index) == ' ' || *(strchr_pointer + index) == '\t'; index++); - if ((*(strchr_pointer + index) < '0' || *(strchr_pointer + index) > '9') && *(strchr_pointer + index) != '?') { + if ((*(strchr_pointer + index) < '0' || *(strchr_pointer + index) > '4') && *(strchr_pointer + index) != '?') { SERIAL_ECHOLNPGM("Invalid T code."); } else { @@ -6811,8 +6811,6 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) if (mmu_enabled) { - //printf_P(PSTR("T code: %d \n"), tmp_extruder); - //mmu_printf_P(PSTR("T%d\n"), tmp_extruder); mmu_command(MMU_CMD_T0 + tmp_extruder); manage_response(true, true); @@ -6820,7 +6818,9 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) mmu_extruder = tmp_extruder; //filament change is finished if (*(strchr_pointer + index) == '?')// for single material usage with mmu + { mmu_load_to_nozzle(); + } } else { diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 40bf5ce9..07361848 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -380,6 +380,12 @@ void manage_response(bool move_axes, bool turn_off_nozzle) if (lcd_update_was_enabled) lcd_update_enable(true); } +//! @brief load filament to nozzle of multimaterial printer +//! +//! This function is used only only after T? (user select filament) and M600 (change filament). +//! It is not used after T0 .. T4 command (select filament), in such case, gcode is responsible for loading +//! filament to nozzle. +//! void mmu_load_to_nozzle() { st_synchronize();