diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index 3eca0c909..cd48edad3 100644
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -5448,24 +5448,32 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
### M24 - Start SD print M24: Start/resume SD print
*/
case 24:
- if (isPrintPaused)
- lcd_resume_print();
- else
+ if (isPrintPaused)
+ lcd_resume_print();
+ else
+ {
+ if (!card.get_sdpos())
{
- if (!card.get_sdpos())
- {
// A new print has started from scratch, reset stats
failstats_reset_print();
sdpos_atomic = 0;
#ifndef LA_NOCOMPAT
- la10c_reset();
+ la10c_reset();
#endif
- }
-
- card.startFileprint();
- starttime=_millis();
}
- break;
+
+ card.startFileprint();
+ starttime=_millis();
+ if (MMU2::mmu2.Enabled())
+ {
+ if (MMU2::mmu2.FindaDetectsFilament() && !fsensor.getFilamentPresent())
+ { // Filament only half way into the PTFE. Unload the filament.
+ MMU2::mmu2.unload();
+ // Tx and Tc gcodes take care of loading the filament to the nozzle.
+ }
+ }
+ }
+ break;
/*!
### M26 - Set SD index M26: Set SD position
diff --git a/Firmware/Tcodes.cpp b/Firmware/Tcodes.cpp
index 52141ddf9..b0f4730e8 100644
--- a/Firmware/Tcodes.cpp
+++ b/Firmware/Tcodes.cpp
@@ -45,7 +45,7 @@ void TCodes(char *const strchr_pointer, uint8_t codeValue) {
if (IsInvalidTCode(strchr_pointer, index)){
TCodeInvalid();
- } /*else if (strchr_pointer[index] == 'x'){
+ } else if (strchr_pointer[index] == 'x'){
// load to bondtech gears; if mmu is not present do nothing
if (MMU2::mmu2.Enabled()) {
MMU2::mmu2.tool_change(strchr_pointer[index], choose_menu_P(_T(MSG_CHOOSE_EXTRUDER), _T(MSG_EXTRUDER)));
@@ -53,9 +53,9 @@ void TCodes(char *const strchr_pointer, uint8_t codeValue) {
} else if (strchr_pointer[index] == 'c'){
// load from bondtech gears to nozzle (nozzle should be preheated)
if (MMU2::mmu2.Enabled()) {
- MMU2::mmu2.tool_change(strchr_pointer[index], 0);
+ MMU2::mmu2.tool_change(strchr_pointer[index], MMU2::mmu2.get_current_tool());
}
- }*/ else {
+ } else {
SChooseFromMenu selectedSlot;
// if (strchr_pointer[index] == '?')
// selectedSlot = TCodeChooseFromMenu();