diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 99738461de..b692c818aa 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -188,7 +188,7 @@ void GCodeParser::parse(char *p) { // Bail if there's no command code number if (!TERN(SIGNED_CODENUM, NUMERIC_SIGNED(*p), NUMERIC(*p))) { - if (TERN0(HAS_MULTI_EXTRUDER, letter == 'T')) { + if (E_TERN0(letter == 'T')) { p[0] = '*'; p[1] = '\0'; string_arg = p; // Convert 'T' alone into 'T*' command_letter = letter; } diff --git a/Marlin/src/gcode/temp/M306.cpp b/Marlin/src/gcode/temp/M306.cpp index b3f5b6b97b..7e79581f2b 100644 --- a/Marlin/src/gcode/temp/M306.cpp +++ b/Marlin/src/gcode/temp/M306.cpp @@ -49,7 +49,7 @@ */ void GcodeSuite::M306() { - const uint8_t e = TERN0(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder)); + const uint8_t e = E_TERN0(parser.intval('E', active_extruder)); if (e >= (EXTRUDERS)) { SERIAL_ECHOLNPGM("?(E)xtruder index out of range (0-", (EXTRUDERS) - 1, ")."); return; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index d39c3079be..bd774f7523 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -1088,7 +1088,7 @@ void DGUSScreenHandlerMKS::filamentUnload(DGUS_VP_Variable &var, void *val_ptr) if (filament_data.action == 0) { // Go back to utility screen TERN_(HAS_EXTRUDERS, thermalManager.setTargetHotend(e_temp, 0)); - TERN_(HAS_MULTI_EXTRUDER, thermalManager.setTargetHotend(e_temp, 1)); + E_TERN_(thermalManager.setTargetHotend(e_temp, 1)); gotoScreen(DGUS_SCREEN_UTILITY); return; } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp index 556c855b25..826d6e1a9d 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp @@ -56,7 +56,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { else { const int16_t new_flow = _MIN(MAX_EXT_SPEED_PERCENT, planner.flow_percentage[0] + uiCfg.stepPrintSpeed); planner.set_flow(0, new_flow); - TERN_(HAS_MULTI_EXTRUDER, planner.set_flow(1, new_flow)); + E_TERN_(planner.set_flow(1, new_flow)); } disp_print_speed(); break; @@ -66,7 +66,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { else { const int16_t new_flow = _MAX(MIN_EXT_SPEED_PERCENT, planner.flow_percentage[0] - uiCfg.stepPrintSpeed); planner.set_flow(0, new_flow); - TERN_(HAS_MULTI_EXTRUDER, planner.set_flow(1, new_flow)); + E_TERN_(planner.set_flow(1, new_flow)); } disp_print_speed(); break; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 5be5e96e13..596c78c6aa 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -103,7 +103,7 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { if (card.isFileOpen()) { feedrate_percentage = 100; TERN_(HAS_EXTRUDERS, planner.set_flow(0, 100)); - TERN_(HAS_MULTI_EXTRUDER, planner.set_flow(1, 100)); + E_TERN_(planner.set_flow(1, 100)); card.startOrResumeFilePrinting(); TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp index a024f050be..eea354f732 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp @@ -235,7 +235,7 @@ void disp_ext_heart() { void disp_temp_type() { if (uiCfg.curTempType == 0) { - if (TERN0(HAS_MULTI_EXTRUDER, uiCfg.extruderIndex == 1)) { + if (E_TERN0(uiCfg.extruderIndex == 1)) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext2); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 45ec98cefd..b3ae273a48 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -651,7 +651,7 @@ char *creat_title_text() { if (card.isFileOpen()) { feedrate_percentage = 100; TERN_(HAS_EXTRUDERS, planner.set_flow(0, 100)); - TERN_(HAS_MULTI_EXTRUDER, planner.set_flow(1, 100)); + E_TERN_(planner.set_flow(1, 100)); card.startOrResumeFilePrinting(); TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 8a83ff62c0..8ba81a6f2e 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -1072,7 +1072,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { //saved_feedrate_percentage = feedrate_percentage; feedrate_percentage = 100; TERN_(HAS_EXTRUDERS, planner.set_flow(0, 100)); - TERN_(HAS_MULTI_EXTRUDER, planner.set_flow(1, 100)); + E_TERN_(planner.set_flow(1, 100)); card.startOrResumeFilePrinting(); TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index af6b24b5c4..f6113c398e 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -390,8 +390,10 @@ bool FTMotion::plan_next_block() { #endif // Cache the extruder index / axis for this block + #if ANY(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) + stepper.stepper_extruder = current_block->extruder; + #endif #if ENABLED(DISTINCT_E_FACTORS) - stepper_extruder = current_block->extruder; block_extruder_axis = E_AXIS_N(current_block->extruder); #endif diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 3584e1290e..2a10c83800 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1593,7 +1593,7 @@ void Stepper::isr() { // FT Motion can be toggled if Standard Motion is also active const bool using_ftMotion = ENABLED(NO_STANDARD_MOTION) || TERN0(FT_MOTION, ftMotion.cfg.active); - // Storage for the timer value of the next possible ISR, used in this do loop + // Storage for the soonest timer value of the next possible ISR, used in this do loop hal_timer_t min_ticks; // Loop until all events for this ISR have been issued