Skip to content

Commit

Permalink
restore extruding without hotend
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp committed Apr 19, 2023
1 parent 19b4ae8 commit f7e797b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/temp/M104_M109.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "../../inc/MarlinConfigPre.h"

#if HAS_EXTRUDERS
#if HAS_HOTEND

#include "../gcode.h"
#include "../../module/temperature.h"
Expand Down Expand Up @@ -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
6 changes: 5 additions & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f7e797b

Please sign in to comment.