diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e0487887de..8d18c51f8a 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3525,7 +3525,7 @@ //#define E_MUX0_PIN 40 // Always Required //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs -#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#elif HAS_PRUSA_MMU2 // Serial port used for communication with MMU2. // For AVR enable the UART port used for the MMU. (e.g., mmuSerial) // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) @@ -3611,7 +3611,7 @@ //#define MMU2_DEBUG // Write debug info to serial output -#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#endif // HAS_PRUSA_MMU2 /** * Advanced Print Counter settings diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index caa5114386..847667fbb2 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -213,7 +213,7 @@ #include "feature/controllerfan.h" #endif -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "feature/mmu/mmu2.h" #endif @@ -772,7 +772,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { #endif // Update the Průša MMU2 - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 mmu2.mmu_loop(); #endif @@ -1262,7 +1262,7 @@ void setup() { SETUP_RUN(test_tmc_connection(true, true, true, true)); #endif - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 SETUP_RUN(mmu2.init()); #endif diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 5f7cf28cd1..a495e96dbb 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "mmu2.h" #include "../../lcd/menu/menu_mmu2.h" @@ -162,7 +162,7 @@ uint8_t MMU2::get_current_tool() { return extruder == MMU2_NO_TOOL ? -1 : extruder; } -#if HAS_PRUSA_MMU2S || ENABLED(MMU_EXTRUDER_SENSOR) +#if EITHER(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR) #define FILAMENT_PRESENT() (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) #endif @@ -681,7 +681,7 @@ static void mmu2_not_responding() { mmu_idl_sens = 0; } -#else // !HAS_PRUSA_MMU2S && DISABLED(MMU_EXTRUDER_SENSOR) +#else // !HAS_PRUSA_MMU2S && !MMU_EXTRUDER_SENSOR /** * Handle tool change @@ -1064,4 +1064,4 @@ void MMU2::filament_runout() { #endif // HAS_LCD_MENU && MMU2_MENUS -#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#endif // HAS_PRUSA_MMU2 diff --git a/Marlin/src/gcode/config/M220.cpp b/Marlin/src/gcode/config/M220.cpp index a5df7bccd4..ae31f9798f 100644 --- a/Marlin/src/gcode/config/M220.cpp +++ b/Marlin/src/gcode/config/M220.cpp @@ -37,7 +37,7 @@ */ void GcodeSuite::M220() { - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 static int16_t backup_feedrate_percentage = 100; if (parser.seen('B')) backup_feedrate_percentage = feedrate_percentage; if (parser.seen('R')) feedrate_percentage = backup_feedrate_percentage; diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index ac00b0d196..163223294d 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -27,7 +27,7 @@ #include "../../module/motion.h" #endif -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "../../feature/mmu/mmu2.h" #endif @@ -54,7 +54,7 @@ void GcodeSuite::T(const int8_t tool_index) { // Count this command as movement / activity reset_stepper_timeout(); - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 if (parser.string_arg) { mmu2.tool_change(parser.string_arg); // Special commands T?/Tx/Tc return; diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index 35604d8086..a100d462da 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -38,7 +38,7 @@ #include "../../../lcd/marlinui.h" #endif -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "../../../feature/mmu/mmu2.h" #endif @@ -98,7 +98,7 @@ void GcodeSuite::M701() { do_blocking_move_to_z(_MIN(current_position.z + park_point.z, Z_MAX_POS), feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); // Load filament - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 mmu2.load_filament_to_nozzle(target_extruder); #else constexpr float purge_length = ADVANCED_PAUSE_PURGE_LENGTH, @@ -198,7 +198,7 @@ void GcodeSuite::M702() { do_blocking_move_to_z(_MIN(current_position.z + park_point.z, Z_MAX_POS), feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); // Unload filament - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 mmu2.unload(); #else #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) diff --git a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp index 1626a126ef..31d076337a 100644 --- a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp +++ b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "../../gcode.h" #include "../../../feature/mmu/mmu2.h" @@ -46,4 +46,4 @@ void GcodeSuite::M403() { SERIAL_ECHO_MSG("M403 - bad arguments."); } -#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#endif // HAS_PRUSA_MMU2 diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 7624957e86..71d48f540d 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -699,7 +699,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 402: M402(); break; // M402: Stow probe #endif - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 case 403: M403(); break; #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 0dac76d923..3e727a49f5 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -735,7 +735,7 @@ private: static void M402(); #endif - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 static void M403(); #endif diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 4daa2e7e62..3d6ee6477f 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -155,7 +155,7 @@ void GCodeParser::parse(char *p) { // Skip spaces to get the numeric part while (*p == ' ') p++; - #if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #if HAS_PRUSA_MMU2 if (letter == 'T') { // check for special MMU2 T?/Tx/Tc commands if (*p == '?' || *p == 'x' || *p == 'c') { diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 0b9e1fba4b..b0b7743306 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -511,6 +511,7 @@ #elif MMU_MODEL % 10 == PRUSA_MMU2 #define HAS_PRUSA_MMU2 1 #elif MMU_MODEL % 10 == PRUSA_MMU2S + #define HAS_PRUSA_MMU2 1 #define HAS_PRUSA_MMU2S 1 #endif #if MMU_MODEL >= SMUFF_EMU_MMU2 @@ -566,7 +567,7 @@ #elif ENABLED(SWITCHING_TOOLHEAD) #define E_STEPPERS EXTRUDERS #define E_MANUAL EXTRUDERS -#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#elif HAS_PRUSA_MMU2 #define E_STEPPERS 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 41e1cb6d44..8dce85e0af 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2963,7 +2963,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) */ #if HAS_SMUFF && EXTRUDERS > 15 #error "Too many extruders for SMUFF_EMU_MMU2(S). (15 maximum)." -#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#elif HAS_PRUSA_MMU2 #if EXTRUDERS != 5 #error "PRUSA_MMU2 / PRUSA_MMU2S requires EXTRUDERS = 5." #elif DISABLED(NOZZLE_PARK_FEATURE) diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 293c536584..b276573b51 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -46,7 +46,7 @@ #define MACHINE_CAN_PAUSE 1 #endif -#if HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#if HAS_PRUSA_MMU2 #include "../../lcd/menu/menu_mmu2.h" #endif diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index 3815a1819e..2bb68f4f40 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -423,7 +423,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define NORM_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR); }while(0) #define REV_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR); }while(0) -#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#elif HAS_PRUSA_MMU2 #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) #define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index b497fe1fdd..db640e34c9 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -87,7 +87,7 @@ #if HAS_PRUSA_MMU1 #include "../feature/mmu/mmu.h" -#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S +#elif HAS_PRUSA_MMU2 #include "../feature/mmu/mmu2.h" #endif @@ -861,7 +861,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { mixer.T(new_tool); #endif - #elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S + #elif HAS_PRUSA_MMU2 UNUSED(no_move);