From 11ab6da9751031823492283a2bac421a5fe7af09 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 27 Oct 2020 22:32:14 -0500 Subject: [PATCH] Fix up config --- Marlin/Configuration_adv.h | 28 ++++++++++++---------------- Marlin/src/inc/Conditionals_LCD.h | 10 +++++----- Marlin/src/inc/SanityCheck.h | 14 +++++++++----- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d5c047a9e4..e0487887de 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3506,15 +3506,16 @@ //#include "Configuration_Secure.h" // External file with WiFi SSID / Password #endif -#if MMU_MODEL == PRUSA_MMU1 +/** + * Průša Multi-Material Unit (MMU) multiplexer + * Enable in Configuration.h + * + * These devices allow a single stepper driver on the board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + */ +#if HAS_PRUSA_MMU1 /** - * Průša Multi-Material-Unit multiplexed - * Enable in Configuration.h - * - * This device allows one stepper driver on a control board to drive - * two to eight stepper motors, one at a time, in a manner suitable - * for extruders. - * * This option only allows the multiplexer to switch on tool-change. * Additional options to configure custom E moves are pending. * @@ -3524,12 +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 MMU_MODEL == PRUSA_MMU2 || MMU_MODEL == PRUSA_MMU2S - /** - * Průša Multi-Material-Unit v2 - * Enable in Configuration.h - */ - +#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S // 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) @@ -3577,7 +3573,7 @@ * This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S. * See https://help.prusa3d.com/en/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560, step 11 */ - #if MMU_MODEL == PRUSA_MMU2S + #if HAS_PRUSA_MMU2S #define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries) #define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min) @@ -3615,7 +3611,7 @@ //#define MMU2_DEBUG // Write debug info to serial output -#endif // MMU_MODEL == PRUSA_MMU2 || MMU_MODEL == PRUSA_MMU2S +#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S /** * Advanced Print Counter settings diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index fa9c8448fb..0b9e1fba4b 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -501,19 +501,19 @@ #define PRUSA_MMU1 1 #define PRUSA_MMU2 2 #define PRUSA_MMU2S 3 -#define SMUFF_EMU_MMU2 4 -#define SMUFF_EMU_MMU2S 5 +#define SMUFF_EMU_MMU2 12 +#define SMUFF_EMU_MMU2S 13 #ifdef MMU_MODEL #define HAS_MMU 1 #if MMU_MODEL == PRUSA_MMU1 #define HAS_PRUSA_MMU1 1 - #elif MMU_MODEL == PRUSA_MMU2 || MMU_MODEL == SMUFF_EMU_MMU2 + #elif MMU_MODEL % 10 == PRUSA_MMU2 #define HAS_PRUSA_MMU2 1 - #elif MMU_MODEL == PRUSA_MMU2S || MMU_MODEL == SMUFF_EMU_MMU2S + #elif MMU_MODEL % 10 == PRUSA_MMU2S #define HAS_PRUSA_MMU2S 1 #endif - #if MMU_MODEL == SMUFF_EMU_MMU2 || MMU_MODEL == SMUFF_EMU_MMU2S + #if MMU_MODEL >= SMUFF_EMU_MMU2 #define HAS_SMUFF 1 #endif #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 0c98e9f4f9..41e1cb6d44 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -910,9 +910,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #elif HAS_PRUSA_MMU1 || HAS_SMUFF + #error "Multi-Material-Unit requires 2 or more EXTRUDERS." + #elif ENABLED(SINGLENOZZLE) + #error "SINGLENOZZLE requires 2 or more EXTRUDERS." + #endif /** @@ -2958,16 +2962,16 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) * Multi-Material-Unit requirements */ #if HAS_SMUFF && EXTRUDERS > 15 - #error "MMU_MODEL=SMUFF_EMU_MMU2/SMUFF_EMU_MMU2S requires EXTRUDERS <= 15." + #error "Too many extruders for SMUFF_EMU_MMU2(S). (15 maximum)." #elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU2S #if EXTRUDERS != 5 - #error "MMU_MODEL=PRUSA_MMU2/PRUSA_MMU2S requires EXTRUDERS = 5." + #error "PRUSA_MMU2 / PRUSA_MMU2S requires EXTRUDERS = 5." #elif DISABLED(NOZZLE_PARK_FEATURE) - #error "MMU_MODEL=PRUSA_MMU2/PRUSA_MMU2S requires NOZZLE_PARK_FEATURE. Enable it to continue." + #error "PRUSA_MMU2 / PRUSA_MMU2S requires NOZZLE_PARK_FEATURE. Enable it to continue." #elif EITHER(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR) && DISABLED(FILAMENT_RUNOUT_SENSOR) - #error "MMU_MODEL=PRUSA_MMU2S or MMU_EXTRUDER_SENSOR requires FILAMENT_RUNOUT_SENSOR. Enable it to continue." + #error "PRUSA_MMU2S or MMU_EXTRUDER_SENSOR requires FILAMENT_RUNOUT_SENSOR. Enable it to continue." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with MMU_MODEL=PRUSA_MMU2/PRUSA_MMU2S/SMUFF_EMU_MMU2/SMUFF_EMU_MMU2S."); + static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2(S) / SMUFF_EMU_MMU2(S)."); #endif #endif