From f7e797bfde7d58a970f13a8e809c6a333311baca Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 19 Apr 2023 21:06:47 +1200 Subject: [PATCH] restore extruding without hotend --- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/gcode/temp/M104_M109.cpp | 4 ++-- Marlin/src/inc/Conditionals_LCD.h | 6 +++++- Marlin/src/inc/Conditionals_adv.h | 6 ++++++ Marlin/src/inc/SanityCheck.h | 8 ++++---- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 0711d39204f2..9d1014e8bfb6 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -581,7 +581,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 102: M102(); break; // M102: Configure Bed Distance Sensor #endif - #if HAS_EXTRUDERS + #if HAS_HOTEND case 104: M104(); break; // M104: Set hot end temperature case 109: M109(); break; // M109: Wait for hotend temperature to reach target #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 8493d7f2911d..d49c544623ba 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -716,7 +716,7 @@ class GcodeSuite { static void M102_report(const bool forReplay=true); #endif - #if HAS_EXTRUDERS + #if HAS_HOTEND static void M104_M109(const bool isM109); FORCE_INLINE static void M104() { M104_M109(false); } FORCE_INLINE static void M109() { M104_M109(true); } diff --git a/Marlin/src/gcode/temp/M104_M109.cpp b/Marlin/src/gcode/temp/M104_M109.cpp index 331ceeb61db1..3a4f61bbea6f 100644 --- a/Marlin/src/gcode/temp/M104_M109.cpp +++ b/Marlin/src/gcode/temp/M104_M109.cpp @@ -28,7 +28,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_EXTRUDERS +#if HAS_HOTEND #include "../gcode.h" #include "../../module/temperature.h" @@ -135,4 +135,4 @@ void GcodeSuite::M104_M109(const bool isM109) { (void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling); } -#endif // EXTRUDERS +#endif // HOTEND diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 60bc65356004..898a75e235e1 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -694,7 +694,11 @@ #endif #ifndef HOTENDS - #define HOTENDS EXTRUDERS + #if TEMP_SENSOR_0 == 0 + #define HOTENDS 0 + #else + #define HOTENDS EXTRUDERS + #endif #endif #ifndef E_STEPPERS #define E_STEPPERS EXTRUDERS diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 3a3daa84acf4..880a8698b3e2 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -334,6 +334,12 @@ #else #undef HEATER_0_MINTEMP #undef HEATER_0_MAXTEMP + #undef THERMAL_PROTECTION_HOTENDS + #undef THERMAL_PROTECTION_PERIOD + #undef WATCH_TEMP_PERIOD + #undef PREVENT_COLD_EXTRUSION + #undef PIDTEMP + #undef AUTOTEMP #endif #if TEMP_SENSOR_IS_MAX_TC(1) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 8a3e0a6cda21..daeed6a9c004 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2629,9 +2629,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Test Sensor & Heater pin combos. * Pins and Sensor IDs must be set for each heater */ -#if HAS_EXTRUDERS && !ANY_PIN(TEMP_0, TEMP_0_CS) +#if HAS_HOTEND && !ANY_PIN(TEMP_0, TEMP_0_CS) #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board." -#elif HAS_EXTRUDERS && !HAS_HEATER_0 +#elif HAS_HOTEND && !HAS_HEATER_0 #error "HEATER_0_PIN not defined for this board." #elif TEMP_SENSOR_IS_MAX_TC(0) && !PIN_EXISTS(TEMP_0_CS) #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." @@ -2834,8 +2834,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." - #elif EXTRUDERS && TEMP_SENSOR_0 == 0 - #error "TEMP_SENSOR_0 is required if there are any extruders." + #elif HOTENDS && TEMP_SENSOR_0 == 0 + #error "TEMP_SENSOR_0 is required if there are any hotends." #endif #endif