Add HAS_HOTEND, etc.

This commit is contained in:
Scott Lahteine 2020-04-19 23:56:55 -05:00
parent 5d0deba938
commit 15f6f53638
38 changed files with 554 additions and 256 deletions

View File

@ -38,7 +38,7 @@
#include "../../../gcode/gcode.h" #include "../../../gcode/gcode.h"
#include "../../../libs/least_squares_fit.h" #include "../../../libs/least_squares_fit.h"
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#include "../../../module/tool_change.h" #include "../../../module/tool_change.h"
#endif #endif

View File

@ -366,11 +366,11 @@ void PrintJobRecovery::resume() {
#endif #endif
// Restore all hotend temperatures // Restore all hotend temperatures
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() { HOTEND_LOOP() {
const int16_t et = info.target_temperature[e]; const int16_t et = info.target_temperature[e];
if (et) { if (et) {
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%i"), e); sprintf_P(cmd, PSTR("T%i"), e);
gcode.process_subcommands_now(cmd); gcode.process_subcommands_now(cmd);
#endif #endif
@ -517,7 +517,7 @@ void PrintJobRecovery::resume() {
DEBUG_ECHOLNPAIR("active_extruder: ", int(info.active_extruder)); DEBUG_ECHOLNPAIR("active_extruder: ", int(info.active_extruder));
#endif #endif
#if HOTENDS #if HAS_HOTEND
DEBUG_ECHOPGM("target_temperature: "); DEBUG_ECHOPGM("target_temperature: ");
HOTEND_LOOP() { HOTEND_LOOP() {
DEBUG_ECHO(info.target_temperature[e]); DEBUG_ECHO(info.target_temperature[e]);

View File

@ -68,7 +68,7 @@ typedef struct {
#endif #endif
#endif #endif
#if HOTENDS #if HAS_HOTEND
int16_t target_temperature[HOTENDS]; int16_t target_temperature[HOTENDS];
#endif #endif

View File

@ -60,7 +60,7 @@
#include "../../../lcd/extui/ui_api.h" #include "../../../lcd/extui/ui_api.h"
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#include "../../../module/tool_change.h" #include "../../../module/tool_change.h"
#endif #endif
@ -283,7 +283,7 @@ G29_TYPE GcodeSuite::G29() {
*/ */
if (!g29_in_progress) { if (!g29_in_progress) {
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
if (active_extruder != 0) tool_change(0); if (active_extruder != 0) tool_change(0);
#endif #endif

View File

@ -27,7 +27,7 @@
#include "../../module/stepper.h" #include "../../module/stepper.h"
#include "../../module/endstops.h" #include "../../module/endstops.h"
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#include "../../module/tool_change.h" #include "../../module/tool_change.h"
#endif #endif
@ -285,7 +285,7 @@ void GcodeSuite::G28() {
#endif #endif
// Always home with tool 0 active // Always home with tool 0 active
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE) #if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
const uint8_t old_tool_index = active_extruder; const uint8_t old_tool_index = active_extruder;
#endif #endif
@ -474,7 +474,7 @@ void GcodeSuite::G28() {
restore_feedrate_and_scaling(); restore_feedrate_and_scaling();
// Restore the active tool after homing // Restore the active tool after homing
#if HOTENDS > 1 && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)) #if HAS_MULTI_HOTEND && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
tool_change(old_tool_index, NONE(PARKING_EXTRUDER, DUAL_X_CARRIAGE)); // Do move if one of these tool_change(old_tool_index, NONE(PARKING_EXTRUDER, DUAL_X_CARRIAGE)); // Do move if one of these
#endif #endif

View File

@ -35,7 +35,7 @@
#include "../../module/probe.h" #include "../../module/probe.h"
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#include "../../module/tool_change.h" #include "../../module/tool_change.h"
#endif #endif

View File

@ -32,7 +32,7 @@
#include "../../module/motion.h" #include "../../module/motion.h"
#include "../../module/probe.h" #include "../../module/probe.h"
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#include "../../module/tool_change.h" #include "../../module/tool_change.h"
#endif #endif
@ -124,7 +124,7 @@ void GcodeSuite::G34() {
#endif #endif
// Always home with tool 0 active // Always home with tool 0 active
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
const uint8_t old_tool_index = active_extruder; const uint8_t old_tool_index = active_extruder;
tool_change(0, true); tool_change(0, true);
#endif #endif
@ -386,7 +386,7 @@ void GcodeSuite::G34() {
#endif #endif
// Restore the active tool after homing // Restore the active tool after homing
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous tool for parking extruder tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous tool for parking extruder
#endif #endif

View File

@ -126,7 +126,7 @@ inline void park_above_object(measurements_t &m, const float uncertainty) {
calibration_move(); calibration_move();
} }
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
inline void set_nozzle(measurements_t &m, const uint8_t extruder) { inline void set_nozzle(measurements_t &m, const uint8_t extruder) {
if (extruder != active_extruder) { if (extruder != active_extruder) {
park_above_object(m, CALIBRATION_MEASUREMENT_UNKNOWN); park_above_object(m, CALIBRATION_MEASUREMENT_UNKNOWN);
@ -505,7 +505,7 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const
TEMPORARY_BACKLASH_CORRECTION(all_on); TEMPORARY_BACKLASH_CORRECTION(all_on);
TEMPORARY_BACKLASH_SMOOTHING(0.0f); TEMPORARY_BACKLASH_SMOOTHING(0.0f);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
set_nozzle(m, extruder); set_nozzle(m, extruder);
#else #else
UNUSED(extruder); UNUSED(extruder);
@ -548,7 +548,7 @@ inline void calibrate_all_toolheads(measurements_t &m, const float uncertainty)
normalize_hotend_offsets(); normalize_hotend_offsets();
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
set_nozzle(m, 0); set_nozzle(m, 0);
#endif #endif
} }
@ -582,7 +582,7 @@ inline void calibrate_all() {
#endif #endif
// Cycle the toolheads so the servos settle into their "natural" positions // Cycle the toolheads so the servos settle into their "natural" positions
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
HOTEND_LOOP() set_nozzle(m, e); HOTEND_LOOP() set_nozzle(m, e);
#endif #endif

View File

@ -466,6 +466,14 @@
#define E_MANUAL EXTRUDERS #define E_MANUAL EXTRUDERS
#endif #endif
#if HOTENDS
#define HAS_HOTEND 1
#if HOTENDS > 1
#define HAS_MULTI_HOTEND 1
#define HAS_HOTEND_OFFSET 1
#endif
#endif
// Helper macros for extruder and hotend arrays // Helper macros for extruder and hotend arrays
#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
#define ARRAY_BY_EXTRUDERS(V...) ARRAY_N(EXTRUDERS, V) #define ARRAY_BY_EXTRUDERS(V...) ARRAY_N(EXTRUDERS, V)
@ -481,10 +489,6 @@
#define SWITCHING_NOZZLE_TWO_SERVOS 1 #define SWITCHING_NOZZLE_TWO_SERVOS 1
#endif #endif
#if HOTENDS > 1
#define HAS_HOTEND_OFFSET 1
#endif
/** /**
* Default hotend offsets, if not defined * Default hotend offsets, if not defined
*/ */

View File

@ -386,7 +386,7 @@
#endif #endif
#if !defined(PSU_POWERUP_DELAY) && ENABLED(PSU_CONTROL) #if !defined(PSU_POWERUP_DELAY) && ENABLED(PSU_CONTROL)
#define PSU_POWERUP_DELAY 100 #define PSU_POWERUP_DELAY 250
#endif #endif
/** /**
@ -1255,94 +1255,238 @@
*/ */
// Steppers // Steppers
#define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X))) #if PIN_EXISTS(X_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X))
#define HAS_X_DIR (PIN_EXISTS(X_DIR)) #define HAS_X_ENABLE 1
#define HAS_X_STEP (PIN_EXISTS(X_STEP)) #endif
#define HAS_X_MICROSTEPS (PIN_EXISTS(X_MS1)) #if PIN_EXISTS(X_DIR)
#define HAS_X_DIR 1
#endif
#if PIN_EXISTS(X_STEP)
#define HAS_X_STEP 1
#endif
#if PIN_EXISTS(X_MS1)
#define HAS_X_MICROSTEPS 1
#endif
#define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))) #if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
#define HAS_X2_DIR (PIN_EXISTS(X2_DIR)) #define HAS_X2_ENABLE 1
#define HAS_X2_STEP (PIN_EXISTS(X2_STEP)) #endif
#define HAS_X2_MICROSTEPS (PIN_EXISTS(X2_MS1)) #if PIN_EXISTS(X2_DIR)
#define HAS_X2_DIR 1
#endif
#if PIN_EXISTS(X2_STEP)
#define HAS_X2_STEP 1
#endif
#if PIN_EXISTS(X2_MS1)
#define HAS_X2_MICROSTEPS 1
#endif
#define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))) #if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
#define HAS_Y_DIR (PIN_EXISTS(Y_DIR)) #define HAS_Y_ENABLE 1
#define HAS_Y_STEP (PIN_EXISTS(Y_STEP)) #endif
#define HAS_Y_MICROSTEPS (PIN_EXISTS(Y_MS1)) #if PIN_EXISTS(Y_DIR)
#define HAS_Y_DIR 1
#endif
#if PIN_EXISTS(Y_STEP)
#define HAS_Y_STEP 1
#endif
#if PIN_EXISTS(Y_MS1)
#define HAS_Y_MICROSTEPS 1
#endif
#define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))) #if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
#define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR)) #define HAS_Y2_ENABLE 1
#define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP)) #endif
#define HAS_Y2_MICROSTEPS (PIN_EXISTS(Y2_MS1)) #if PIN_EXISTS(Y2_DIR)
#define HAS_Y2_DIR 1
#endif
#if PIN_EXISTS(Y2_STEP)
#define HAS_Y2_STEP 1
#endif
#if PIN_EXISTS(Y2_MS1)
#define HAS_Y2_MICROSTEPS 1
#endif
#define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))) #if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
#define HAS_Z_DIR (PIN_EXISTS(Z_DIR)) #define HAS_Z_ENABLE 1
#define HAS_Z_STEP (PIN_EXISTS(Z_STEP)) #endif
#define HAS_Z_MICROSTEPS (PIN_EXISTS(Z_MS1)) #if PIN_EXISTS(Z_DIR)
#define HAS_Z_DIR 1
#endif
#if PIN_EXISTS(Z_STEP)
#define HAS_Z_STEP 1
#endif
#if PIN_EXISTS(Z_MS1)
#define HAS_Z_MICROSTEPS 1
#endif
#define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))) #if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR)) #define HAS_Z2_ENABLE 1
#define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP)) #endif
#define HAS_Z2_MICROSTEPS (PIN_EXISTS(Z2_MS1)) #if PIN_EXISTS(Z2_DIR)
#define HAS_Z2_DIR 1
#endif
#if PIN_EXISTS(Z2_STEP)
#define HAS_Z2_STEP 1
#endif
#if PIN_EXISTS(Z2_MS1)
#define HAS_Z2_MICROSTEPS 1
#endif
#define HAS_Z3_ENABLE (PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))) #if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#define HAS_Z3_DIR (PIN_EXISTS(Z3_DIR)) #define HAS_Z3_ENABLE 1
#define HAS_Z3_STEP (PIN_EXISTS(Z3_STEP)) #endif
#define HAS_Z3_MICROSTEPS (PIN_EXISTS(Z3_MS1)) #if PIN_EXISTS(Z3_DIR)
#define HAS_Z3_DIR 1
#endif
#if PIN_EXISTS(Z3_STEP)
#define HAS_Z3_STEP 1
#endif
#if PIN_EXISTS(Z3_MS1)
#define HAS_Z3_MICROSTEPS 1
#endif
#define HAS_Z4_ENABLE (PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))) #if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#define HAS_Z4_DIR (PIN_EXISTS(Z4_DIR)) #define HAS_Z4_ENABLE 1
#define HAS_Z4_STEP (PIN_EXISTS(Z4_STEP)) #endif
#define HAS_Z4_MICROSTEPS (PIN_EXISTS(Z4_MS1)) #if PIN_EXISTS(Z4_DIR)
#define HAS_Z4_DIR 1
#endif
#if PIN_EXISTS(Z4_STEP)
#define HAS_Z4_STEP 1
#endif
#if PIN_EXISTS(Z4_MS1)
#define HAS_Z4_MICROSTEPS 1
#endif
// Extruder steppers and solenoids // Extruder steppers and solenoids
#define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))) #if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
#define HAS_E0_DIR (PIN_EXISTS(E0_DIR)) #define HAS_E0_ENABLE 1
#define HAS_E0_STEP (PIN_EXISTS(E0_STEP)) #endif
#define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1)) #if PIN_EXISTS(E0_DIR)
#define HAS_SOLENOID_0 (PIN_EXISTS(SOL0)) #define HAS_E0_DIR 1
#endif
#if PIN_EXISTS(E0_STEP)
#define HAS_E0_STEP 1
#endif
#if PIN_EXISTS(E0_MS1)
#define HAS_E0_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL0)
#define HAS_SOLENOID_0 1
#endif
#define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))) #if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
#define HAS_E1_DIR (PIN_EXISTS(E1_DIR)) #define HAS_E1_ENABLE 1
#define HAS_E1_STEP (PIN_EXISTS(E1_STEP)) #endif
#define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1)) #if PIN_EXISTS(E1_DIR)
#define HAS_SOLENOID_1 (PIN_EXISTS(SOL1)) #define HAS_E1_DIR 1
#endif
#if PIN_EXISTS(E1_STEP)
#define HAS_E1_STEP 1
#endif
#if PIN_EXISTS(E1_MS1)
#define HAS_E1_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL1)
#define HAS_SOLENOID_1 1
#endif
#define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))) #if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
#define HAS_E2_DIR (PIN_EXISTS(E2_DIR)) #define HAS_E2_ENABLE 1
#define HAS_E2_STEP (PIN_EXISTS(E2_STEP)) #endif
#define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1)) #if PIN_EXISTS(E2_DIR)
#define HAS_SOLENOID_2 (PIN_EXISTS(SOL2)) #define HAS_E2_DIR 1
#endif
#if PIN_EXISTS(E2_STEP)
#define HAS_E2_STEP 1
#endif
#if PIN_EXISTS(E2_MS1)
#define HAS_E2_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL2)
#define HAS_SOLENOID_2 1
#endif
#define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))) #if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
#define HAS_E3_DIR (PIN_EXISTS(E3_DIR)) #define HAS_E3_ENABLE 1
#define HAS_E3_STEP (PIN_EXISTS(E3_STEP)) #endif
#define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1)) #if PIN_EXISTS(E3_DIR)
#define HAS_SOLENOID_3 (PIN_EXISTS(SOL3)) #define HAS_E3_DIR 1
#endif
#if PIN_EXISTS(E3_STEP)
#define HAS_E3_STEP 1
#endif
#if PIN_EXISTS(E3_MS1)
#define HAS_E3_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL3)
#define HAS_SOLENOID_3 1
#endif
#define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))) #if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
#define HAS_E4_DIR (PIN_EXISTS(E4_DIR)) #define HAS_E4_ENABLE 1
#define HAS_E4_STEP (PIN_EXISTS(E4_STEP)) #endif
#define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1)) #if PIN_EXISTS(E4_DIR)
#define HAS_SOLENOID_4 (PIN_EXISTS(SOL4)) #define HAS_E4_DIR 1
#endif
#if PIN_EXISTS(E4_STEP)
#define HAS_E4_STEP 1
#endif
#if PIN_EXISTS(E4_MS1)
#define HAS_E4_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL4)
#define HAS_SOLENOID_4 1
#endif
#define HAS_E5_ENABLE (PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))) #if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
#define HAS_E5_DIR (PIN_EXISTS(E5_DIR)) #define HAS_E5_ENABLE 1
#define HAS_E5_STEP (PIN_EXISTS(E5_STEP)) #endif
#define HAS_E5_MICROSTEPS (PIN_EXISTS(E5_MS1)) #if PIN_EXISTS(E5_DIR)
#define HAS_SOLENOID_5 (PIN_EXISTS(SOL5)) #define HAS_E5_DIR 1
#endif
#if PIN_EXISTS(E5_STEP)
#define HAS_E5_STEP 1
#endif
#if PIN_EXISTS(E5_MS1)
#define HAS_E5_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL5)
#define HAS_SOLENOID_5 1
#endif
#define HAS_E6_ENABLE (PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))) #if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
#define HAS_E6_DIR (PIN_EXISTS(E6_DIR)) #define HAS_E6_ENABLE 1
#define HAS_E6_STEP (PIN_EXISTS(E6_STEP)) #endif
#define HAS_E6_MICROSTEPS (PIN_EXISTS(E6_MS1)) #if PIN_EXISTS(E6_DIR)
#define HAS_SOLENOID_6 (PIN_EXISTS(SOL6)) #define HAS_E6_DIR 1
#endif
#if PIN_EXISTS(E6_STEP)
#define HAS_E6_STEP 1
#endif
#if PIN_EXISTS(E6_MS1)
#define HAS_E6_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL6)
#define HAS_SOLENOID_6 1
#endif
#define HAS_E7_ENABLE (PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))) #if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
#define HAS_E7_DIR (PIN_EXISTS(E7_DIR)) #define HAS_E7_ENABLE 1
#define HAS_E7_STEP (PIN_EXISTS(E7_STEP)) #endif
#define HAS_E7_MICROSTEPS (PIN_EXISTS(E7_MS1)) #if PIN_EXISTS(E7_DIR)
#define HAS_SOLENOID_7 (PIN_EXISTS(SOL7)) #define HAS_E7_DIR 1
#endif
#if PIN_EXISTS(E7_STEP)
#define HAS_E7_STEP 1
#endif
#if PIN_EXISTS(E7_MS1)
#define HAS_E7_MICROSTEPS 1
#endif
#if PIN_EXISTS(SOL7)
#define HAS_SOLENOID_7 1
#endif
// Trinamic Stepper Drivers // Trinamic Stepper Drivers
#if HAS_TRINAMIC_CONFIG #if HAS_TRINAMIC_CONFIG
@ -1405,62 +1549,146 @@
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_) #define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
#define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M)) #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
#define HAS_X_MIN _HAS_STOP(X,MIN) #if _HAS_STOP(X,MIN)
#define HAS_X_MAX _HAS_STOP(X,MAX) #define HAS_X_MIN 1
#define HAS_Y_MIN _HAS_STOP(Y,MIN) #endif
#define HAS_Y_MAX _HAS_STOP(Y,MAX) #if _HAS_STOP(X,MAX)
#define HAS_Z_MIN _HAS_STOP(Z,MIN) #define HAS_X_MAX 1
#define HAS_Z_MAX _HAS_STOP(Z,MAX) #endif
#define HAS_X2_MIN (PIN_EXISTS(X2_MIN)) #if _HAS_STOP(Y,MIN)
#define HAS_X2_MAX (PIN_EXISTS(X2_MAX)) #define HAS_Y_MIN 1
#define HAS_Y2_MIN (PIN_EXISTS(Y2_MIN)) #endif
#define HAS_Y2_MAX (PIN_EXISTS(Y2_MAX)) #if _HAS_STOP(Y,MAX)
#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN)) #define HAS_Y_MAX 1
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX)) #endif
#define HAS_Z3_MIN (PIN_EXISTS(Z3_MIN)) #if _HAS_STOP(Z,MIN)
#define HAS_Z3_MAX (PIN_EXISTS(Z3_MAX)) #define HAS_Z_MIN 1
#define HAS_Z4_MIN (PIN_EXISTS(Z4_MIN)) #endif
#define HAS_Z4_MAX (PIN_EXISTS(Z4_MAX)) #if _HAS_STOP(Z,MAX)
#define HAS_Z_MIN_PROBE_PIN (HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE)) #define HAS_Z_MAX 1
#endif
#if PIN_EXISTS(X2_MIN)
#define HAS_X2_MIN 1
#endif
#if PIN_EXISTS(X2_MAX)
#define HAS_X2_MAX 1
#endif
#if PIN_EXISTS(Y2_MIN)
#define HAS_Y2_MIN 1
#endif
#if PIN_EXISTS(Y2_MAX)
#define HAS_Y2_MAX 1
#endif
#if PIN_EXISTS(Z2_MIN)
#define HAS_Z2_MIN 1
#endif
#if PIN_EXISTS(Z2_MAX)
#define HAS_Z2_MAX 1
#endif
#if PIN_EXISTS(Z3_MIN)
#define HAS_Z3_MIN 1
#endif
#if PIN_EXISTS(Z3_MAX)
#define HAS_Z3_MAX 1
#endif
#if PIN_EXISTS(Z4_MIN)
#define HAS_Z4_MIN 1
#endif
#if PIN_EXISTS(Z4_MAX)
#define HAS_Z4_MAX 1
#endif
#if HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE)
#define HAS_Z_MIN_PROBE_PIN 1
#endif
// //
// ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface) // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
// //
#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && DISABLED(HEATER_##P##_USES_MAX6675)) #define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && DISABLED(HEATER_##P##_USES_MAX6675))
#define HAS_TEMP_ADC_0 HAS_ADC_TEST(0) #if HAS_ADC_TEST(0)
#define HAS_TEMP_ADC_1 HAS_ADC_TEST(1) #define HAS_TEMP_ADC_0 1
#define HAS_TEMP_ADC_2 HAS_ADC_TEST(2) #endif
#define HAS_TEMP_ADC_3 HAS_ADC_TEST(3) #if HAS_ADC_TEST(1)
#define HAS_TEMP_ADC_4 HAS_ADC_TEST(4) #define HAS_TEMP_ADC_1 1
#define HAS_TEMP_ADC_5 HAS_ADC_TEST(5) #endif
#define HAS_TEMP_ADC_6 HAS_ADC_TEST(6) #if HAS_ADC_TEST(2)
#define HAS_TEMP_ADC_7 HAS_ADC_TEST(7) #define HAS_TEMP_ADC_2 1
#define HAS_TEMP_ADC_BED HAS_ADC_TEST(BED) #endif
#define HAS_TEMP_ADC_PROBE HAS_ADC_TEST(PROBE) #if HAS_ADC_TEST(3)
#define HAS_TEMP_ADC_CHAMBER HAS_ADC_TEST(CHAMBER) #define HAS_TEMP_ADC_3 1
#endif
#if HAS_ADC_TEST(4)
#define HAS_TEMP_ADC_4 1
#endif
#if HAS_ADC_TEST(5)
#define HAS_TEMP_ADC_5 1
#endif
#if HAS_ADC_TEST(6)
#define HAS_TEMP_ADC_6 1
#endif
#if HAS_ADC_TEST(7)
#define HAS_TEMP_ADC_7 1
#endif
#if HAS_ADC_TEST(BED)
#define HAS_TEMP_ADC_BED 1
#endif
#if HAS_ADC_TEST(PROBE)
#define HAS_TEMP_ADC_PROBE 1
#endif
#if HAS_ADC_TEST(CHAMBER)
#define HAS_TEMP_ADC_CHAMBER 1
#endif
#define HAS_TEMP_HOTEND ((HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675)) && HOTENDS) #if HOTENDS && (HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675))
#define HAS_TEMP_HOTEND 1
#endif
#define HAS_TEMP_BED HAS_TEMP_ADC_BED #define HAS_TEMP_BED HAS_TEMP_ADC_BED
#define HAS_TEMP_PROBE HAS_TEMP_ADC_PROBE #define HAS_TEMP_PROBE HAS_TEMP_ADC_PROBE
#define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER #define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
#if ENABLED(JOYSTICK) #if ENABLED(JOYSTICK)
#define HAS_JOY_ADC_X PIN_EXISTS(JOY_X) #if PIN_EXISTS(JOY_X)
#define HAS_JOY_ADC_Y PIN_EXISTS(JOY_Y) #define HAS_JOY_ADC_X 1
#define HAS_JOY_ADC_Z PIN_EXISTS(JOY_Z) #endif
#define HAS_JOY_ADC_EN PIN_EXISTS(JOY_EN) #if PIN_EXISTS(JOY_Y)
#define HAS_JOY_ADC_Y 1
#endif
#if PIN_EXISTS(JOY_Z)
#define HAS_JOY_ADC_Z 1
#endif
#if PIN_EXISTS(JOY_EN)
#define HAS_JOY_ADC_EN 1
#endif
#endif #endif
// Heaters // Heaters
#define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) #if PIN_EXISTS(HEATER_0)
#define HAS_HEATER_1 (PIN_EXISTS(HEATER_1)) #define HAS_HEATER_0 1
#define HAS_HEATER_2 (PIN_EXISTS(HEATER_2)) #endif
#define HAS_HEATER_3 (PIN_EXISTS(HEATER_3)) #if PIN_EXISTS(HEATER_1)
#define HAS_HEATER_4 (PIN_EXISTS(HEATER_4)) #define HAS_HEATER_1 1
#define HAS_HEATER_5 (PIN_EXISTS(HEATER_5)) #endif
#define HAS_HEATER_6 (PIN_EXISTS(HEATER_6)) #if PIN_EXISTS(HEATER_2)
#define HAS_HEATER_7 (PIN_EXISTS(HEATER_7)) #define HAS_HEATER_2 1
#define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) #endif
#if PIN_EXISTS(HEATER_3)
#define HAS_HEATER_3 1
#endif
#if PIN_EXISTS(HEATER_4)
#define HAS_HEATER_4 1
#endif
#if PIN_EXISTS(HEATER_5)
#define HAS_HEATER_5 1
#endif
#if PIN_EXISTS(HEATER_6)
#define HAS_HEATER_6 1
#endif
#if PIN_EXISTS(HEATER_7)
#define HAS_HEATER_7 1
#endif
#if PIN_EXISTS(HEATER_BED)
#define HAS_HEATER_BED 1
#endif
// Shorthand for common combinations // Shorthand for common combinations
#if HAS_TEMP_BED && HAS_HEATER_BED #if HAS_TEMP_BED && HAS_HEATER_BED
@ -1507,15 +1735,33 @@
#endif #endif
// Auto fans // Auto fans
#define HAS_AUTO_FAN_0 (HOTENDS > 0 && PIN_EXISTS(E0_AUTO_FAN)) #if HAS_HOTEND && PIN_EXISTS(E0_AUTO_FAN)
#define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN)) #define HAS_AUTO_FAN_0 1
#define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN)) #endif
#define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)) #if HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN)
#define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) #define HAS_AUTO_FAN_1 1
#define HAS_AUTO_FAN_5 (HOTENDS > 5 && PIN_EXISTS(E5_AUTO_FAN)) #endif
#define HAS_AUTO_FAN_6 (HOTENDS > 6 && PIN_EXISTS(E6_AUTO_FAN)) #if HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN)
#define HAS_AUTO_FAN_7 (HOTENDS > 7 && PIN_EXISTS(E7_AUTO_FAN)) #define HAS_AUTO_FAN_2 1
#define HAS_AUTO_CHAMBER_FAN (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN)) #endif
#if HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)
#define HAS_AUTO_FAN_3 1
#endif
#if HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)
#define HAS_AUTO_FAN_4 1
#endif
#if HOTENDS > 5 && PIN_EXISTS(E5_AUTO_FAN)
#define HAS_AUTO_FAN_5 1
#endif
#if HOTENDS > 6 && PIN_EXISTS(E6_AUTO_FAN)
#define HAS_AUTO_FAN_6 1
#endif
#if HOTENDS > 7 && PIN_EXISTS(E7_AUTO_FAN)
#define HAS_AUTO_FAN_7 1
#endif
#if HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN)
#define HAS_AUTO_CHAMBER_FAN 1
#endif
#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_FAN_4 || HAS_AUTO_FAN_5 || HAS_AUTO_FAN_6 || HAS_AUTO_FAN_7 || HAS_AUTO_CHAMBER_FAN) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_FAN_4 || HAS_AUTO_FAN_5 || HAS_AUTO_FAN_6 || HAS_AUTO_FAN_7 || HAS_AUTO_CHAMBER_FAN)
#define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN) #define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN)
@ -1535,24 +1781,52 @@
// Other fans // Other fans
#define HAS_FAN0 (PIN_EXISTS(FAN)) #define HAS_FAN0 (PIN_EXISTS(FAN))
#define _HAS_FAN(P) (PIN_EXISTS(FAN##P) && CONTROLLER_FAN_PIN != FAN##P##_PIN && E0_AUTO_FAN_PIN != FAN##P##_PIN && E1_AUTO_FAN_PIN != FAN##P##_PIN && E2_AUTO_FAN_PIN != FAN##P##_PIN && E3_AUTO_FAN_PIN != FAN##P##_PIN && E4_AUTO_FAN_PIN != FAN##P##_PIN && E5_AUTO_FAN_PIN != FAN##P##_PIN && E6_AUTO_FAN_PIN != FAN##P##_PIN && E7_AUTO_FAN_PIN != FAN##P##_PIN) #define _HAS_FAN(P) (PIN_EXISTS(FAN##P) && CONTROLLER_FAN_PIN != FAN##P##_PIN && E0_AUTO_FAN_PIN != FAN##P##_PIN && E1_AUTO_FAN_PIN != FAN##P##_PIN && E2_AUTO_FAN_PIN != FAN##P##_PIN && E3_AUTO_FAN_PIN != FAN##P##_PIN && E4_AUTO_FAN_PIN != FAN##P##_PIN && E5_AUTO_FAN_PIN != FAN##P##_PIN && E6_AUTO_FAN_PIN != FAN##P##_PIN && E7_AUTO_FAN_PIN != FAN##P##_PIN)
#define HAS_FAN1 _HAS_FAN(1) #if _HAS_FAN(1)
#define HAS_FAN2 _HAS_FAN(2) #define HAS_FAN1 1
#define HAS_FAN3 _HAS_FAN(3) #endif
#define HAS_FAN4 _HAS_FAN(4) #if _HAS_FAN(2)
#define HAS_FAN5 _HAS_FAN(5) #define HAS_FAN2 1
#define HAS_FAN6 _HAS_FAN(6) #endif
#define HAS_FAN7 _HAS_FAN(7) #if _HAS_FAN(3)
#define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN)) #define HAS_FAN3 1
#endif
#if _HAS_FAN(4)
#define HAS_FAN4 1
#endif
#if _HAS_FAN(5)
#define HAS_FAN5 1
#endif
#if _HAS_FAN(6)
#define HAS_FAN6 1
#endif
#if _HAS_FAN(7)
#define HAS_FAN7 1
#endif
#if PIN_EXISTS(CONTROLLER_FAN)
#define HAS_CONTROLLER_FAN 1
#endif
// Servos // Servos
#define HAS_SERVO_0 (PIN_EXISTS(SERVO0) && NUM_SERVOS > 0) #if PIN_EXISTS(SERVO0) && NUM_SERVOS > 0
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1) && NUM_SERVOS > 1) #define HAS_SERVO_0 1
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2) && NUM_SERVOS > 2) #endif
#define HAS_SERVO_3 (PIN_EXISTS(SERVO3) && NUM_SERVOS > 3) #if PIN_EXISTS(SERVO1) && NUM_SERVOS > 1
#define HAS_SERVOS (NUM_SERVOS > 0) #define HAS_SERVO_1 1
#endif
#if PIN_EXISTS(SERVO2) && NUM_SERVOS > 2
#define HAS_SERVO_2 1
#endif
#if PIN_EXISTS(SERVO3) && NUM_SERVOS > 3
#define HAS_SERVO_3 1
#endif
#if NUM_SERVOS > 0
#define HAS_SERVOS 1
#endif
// Sensors // Sensors
#define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH)) #if PIN_EXISTS(FILWIDTH)
#define HAS_FILAMENT_WIDTH_SENSOR 1
#endif
// User Interface // User Interface
#if PIN_EXISTS(HOME) #if PIN_EXISTS(HOME)
@ -1638,14 +1912,30 @@
#endif #endif
#endif #endif
#define HAS_MICROSTEP1 defined(MICROSTEP1) #ifdef MICROSTEP1
#define HAS_MICROSTEP2 defined(MICROSTEP2) #define HAS_MICROSTEP1 1
#define HAS_MICROSTEP4 defined(MICROSTEP4) #endif
#define HAS_MICROSTEP8 defined(MICROSTEP8) #ifdef MICROSTEP2
#define HAS_MICROSTEP16 defined(MICROSTEP16) #define HAS_MICROSTEP2 1
#define HAS_MICROSTEP32 defined(MICROSTEP32) #endif
#define HAS_MICROSTEP64 defined(MICROSTEP64) #ifdef MICROSTEP4
#define HAS_MICROSTEP128 defined(MICROSTEP128) #define HAS_MICROSTEP4 1
#endif
#ifdef MICROSTEP8
#define HAS_MICROSTEP8 1
#endif
#ifdef MICROSTEP16
#define HAS_MICROSTEP16 1
#endif
#ifdef MICROSTEP32
#define HAS_MICROSTEP32 1
#endif
#ifdef MICROSTEP64
#define HAS_MICROSTEP64 1
#endif
#ifdef MICROSTEP128
#define HAS_MICROSTEP128 1
#endif
#endif // HAS_MICROSTEPS #endif // HAS_MICROSTEPS
@ -1896,8 +2186,12 @@
#undef NO_FAN_SLOWING_IN_PID_TUNING #undef NO_FAN_SLOWING_IN_PID_TUNING
#endif #endif
#define QUIET_PROBING (HAS_BED_PROBE && (EITHER(PROBING_HEATERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)) #if HAS_BED_PROBE && (EITHER(PROBING_HEATERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0)
#define HEATER_IDLE_HANDLER EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) #define QUIET_PROBING 1
#endif
#if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
#define HEATER_IDLE_HANDLER 1
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH) #if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH)
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0

View File

@ -1591,11 +1591,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board." #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
#elif HOTENDS && !HAS_TEMP_HOTEND #elif HOTENDS && !HAS_TEMP_HOTEND
#error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
#elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1 #elif (HAS_MULTI_HOTEND || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1
#error "HEATER_1_PIN not defined for this board." #error "HEATER_1_PIN not defined for this board."
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if ENABLED(HEATER_1_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS2) #if ENABLED(HEATER_1_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS2)
#error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board." #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
#elif TEMP_SENSOR_1 == 0 #elif TEMP_SENSOR_1 == 0

View File

@ -745,7 +745,7 @@ void MarlinUI::draw_status_screen() {
// //
// Hotend 1 or Bed Temperature // Hotend 1 or Bed Temperature
// //
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
lcd_moveto(8, 0); lcd_moveto(8, 0);
_draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink);
#elif HAS_HEATED_BED #elif HAS_HEATED_BED
@ -763,7 +763,7 @@ void MarlinUI::draw_status_screen() {
// //
// Hotend 1 or Bed Temperature // Hotend 1 or Bed Temperature
// //
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
lcd_moveto(10, 0); lcd_moveto(10, 0);
_draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink);
#elif HAS_HEATED_BED #elif HAS_HEATED_BED
@ -791,7 +791,7 @@ void MarlinUI::draw_status_screen() {
// If the first line has two extruder temps, // If the first line has two extruder temps,
// show more temperatures on the next line // show more temperatures on the next line
#if HOTENDS > 2 || (HOTENDS > 1 && HAS_HEATED_BED) #if HOTENDS > 2 || (HAS_MULTI_HOTEND && HAS_HEATED_BED)
#if HOTENDS > 2 #if HOTENDS > 2
_draw_heater_status(H_E2, LCD_STR_THERMOMETER[0], blink); _draw_heater_status(H_E2, LCD_STR_THERMOMETER[0], blink);
@ -924,7 +924,7 @@ void MarlinUI::draw_status_screen() {
lcd_moveto(LCD_WIDTH - 9, 0); lcd_moveto(LCD_WIDTH - 9, 0);
_draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink);
#if HAS_LEVELING && (HOTENDS > 1 || !HAS_HEATED_BED) #if HAS_LEVELING && (HAS_MULTI_HOTEND || !HAS_HEATED_BED)
lcd_put_wchar(LCD_WIDTH - 1, 0, planner.leveling_active || blink ? '_' : ' '); lcd_put_wchar(LCD_WIDTH - 1, 0, planner.leveling_active || blink ? '_' : ' ');
#endif #endif
@ -934,7 +934,7 @@ void MarlinUI::draw_status_screen() {
// Hotend 1 or Bed Temperature // Hotend 1 or Bed Temperature
// //
lcd_moveto(0, 1); lcd_moveto(0, 1);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
_draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink);
#elif HAS_HEATED_BED #elif HAS_HEATED_BED
_draw_bed_status(blink); _draw_bed_status(blink);
@ -952,7 +952,7 @@ void MarlinUI::draw_status_screen() {
lcd_moveto(0, 2); lcd_moveto(0, 2);
#if HOTENDS > 2 #if HOTENDS > 2
_draw_heater_status(H_E2, LCD_STR_THERMOMETER[0], blink); _draw_heater_status(H_E2, LCD_STR_THERMOMETER[0], blink);
#elif HOTENDS > 1 && HAS_HEATED_BED #elif HAS_MULTI_HOTEND && HAS_HEATED_BED
_draw_bed_status(blink); _draw_bed_status(blink);
#elif HAS_PRINT_PROGRESS #elif HAS_PRINT_PROGRESS
#define DREW_PRINT_PROGRESS #define DREW_PRINT_PROGRESS
@ -1077,7 +1077,7 @@ void MarlinUI::draw_status_screen() {
if (thermalManager.degTargetBed() > 0) leds |= LED_A; if (thermalManager.degTargetBed() > 0) leds |= LED_A;
#endif #endif
#if HOTENDS #if HAS_HOTEND
if (thermalManager.degTargetHotend(0) > 0) leds |= LED_B; if (thermalManager.degTargetHotend(0) > 0) leds |= LED_B;
#endif #endif
@ -1110,7 +1110,7 @@ void MarlinUI::draw_status_screen() {
) leds |= LED_C; ) leds |= LED_C;
#endif // FAN_COUNT > 0 #endif // FAN_COUNT > 0
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
if (thermalManager.degTargetHotend(1) > 0) leds |= LED_C; if (thermalManager.degTargetHotend(1) > 0) leds |= LED_C;
#endif #endif

View File

@ -278,7 +278,7 @@
// //
// Status Screen Hotends bitmaps // Status Screen Hotends bitmaps
// //
#if HOTENDS #if HAS_HOTEND
#define STATUS_HOTEND1_WIDTH 16 #define STATUS_HOTEND1_WIDTH 16
@ -1343,7 +1343,7 @@
#undef STATUS_LOGO_WIDTH #undef STATUS_LOGO_WIDTH
#endif #endif
#if (HOTENDS > 1 && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN) #if (HAS_MULTI_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN)
#define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2) #define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2)
#if STATUS_HOTEND1_WIDTH #if STATUS_HOTEND1_WIDTH
#if HOTENDS > 2 #if HOTENDS > 2
@ -1474,7 +1474,7 @@
constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X); constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X);
#define STATUS_HOTEND_X(N) status_hotend_x[N] #define STATUS_HOTEND_X(N) status_hotend_x[N]
#elif HOTENDS > 1 #elif HAS_MULTI_HOTEND
#define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X) #define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X)
#else #else
#define STATUS_HOTEND_X(N) STATUS_HOTEND1_X #define STATUS_HOTEND_X(N) STATUS_HOTEND1_X

View File

@ -431,7 +431,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() {
// Draw the static icons in GDRAM // Draw the static icons in GDRAM
draw_gdram_icon(0, 0, nozzle_icon); draw_gdram_icon(0, 0, nozzle_icon);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
draw_gdram_icon(0, 1, nozzle_icon); draw_gdram_icon(0, 1, nozzle_icon);
draw_gdram_icon(0, 2, bed_icon); draw_gdram_icon(0, 2, bed_icon);
#else #else
@ -584,7 +584,7 @@ void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const i
#if HAS_HEATED_BED #if HAS_HEATED_BED
void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) { void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
const bool show_target = target && FAR(temp, target); const bool show_target = target && FAR(temp, target);
draw_temps(HOTENDS > 1 ? 2 : 1, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate); draw_temps(HAS_MULTI_HOTEND ? 2 : 1, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate);
display_state.bed_show_target = show_target; display_state.bed_show_target = show_target;
} }
#endif #endif
@ -704,7 +704,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() {
const uint16_t feedrate_perc = feedrate_percentage; const uint16_t feedrate_perc = feedrate_percentage;
const uint16_t fs = thermalManager.scaledFanSpeed(0); const uint16_t fs = thermalManager.scaledFanSpeed(0);
const int16_t extruder_1_target = thermalManager.degTargetHotend(0); const int16_t extruder_1_target = thermalManager.degTargetHotend(0);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
const int16_t extruder_2_target = thermalManager.degTargetHotend(1); const int16_t extruder_2_target = thermalManager.degTargetHotend(1);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -731,7 +731,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
const uint16_t feedrate_perc = feedrate_percentage; const uint16_t feedrate_perc = feedrate_percentage;
const int16_t extruder_1_temp = thermalManager.degHotend(0), const int16_t extruder_1_temp = thermalManager.degHotend(0),
extruder_1_target = thermalManager.degTargetHotend(0); extruder_1_target = thermalManager.degTargetHotend(0);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
const int16_t extruder_2_temp = thermalManager.degHotend(1), const int16_t extruder_2_temp = thermalManager.degHotend(1),
extruder_2_target = thermalManager.degTargetHotend(1); extruder_2_target = thermalManager.degTargetHotend(1);
#endif #endif
@ -741,7 +741,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
#endif #endif
draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate); draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate); draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED

View File

@ -115,7 +115,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
) )
.tag(14).button( TMC_HOMING_THRS_POS, GET_TEXT_F(MSG_TMC_HOMING_THRS)) .tag(14).button( TMC_HOMING_THRS_POS, GET_TEXT_F(MSG_TMC_HOMING_THRS))
.enabled( .enabled(
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
1 1
#endif #endif
) )
@ -157,7 +157,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
case 2: GOTO_SCREEN(ZOffsetScreen); break; case 2: GOTO_SCREEN(ZOffsetScreen); break;
#endif #endif
case 3: GOTO_SCREEN(StepsScreen); break; case 3: GOTO_SCREEN(StepsScreen); break;
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
case 4: GOTO_SCREEN(NozzleOffsetScreen); break; case 4: GOTO_SCREEN(NozzleOffsetScreen); break;
#endif #endif
case 5: GOTO_SCREEN(MaxVelocityScreen); break; case 5: GOTO_SCREEN(MaxVelocityScreen); break;

View File

@ -58,7 +58,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS))
.tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
.enabled( .enabled(
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
1 1
#endif #endif
) )
@ -105,7 +105,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
#endif #endif
case 5: GOTO_SCREEN(EndstopStatesScreen); break; case 5: GOTO_SCREEN(EndstopStatesScreen); break;
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
case 6: GOTO_SCREEN(NozzleOffsetScreen); break; case 6: GOTO_SCREEN(NozzleOffsetScreen); break;
#endif #endif

View File

@ -172,8 +172,8 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
const bool tog3 = screen_data.ChangeFilamentScreen.t_tag == 3; const bool tog3 = screen_data.ChangeFilamentScreen.t_tag == 3;
const bool tog4 = screen_data.ChangeFilamentScreen.t_tag == 4; const bool tog4 = screen_data.ChangeFilamentScreen.t_tag == 4;
const bool tog10 = screen_data.ChangeFilamentScreen.e_tag == 10; const bool tog10 = screen_data.ChangeFilamentScreen.e_tag == 10;
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
const bool tog11 = screen_data.ChangeFilamentScreen.e_tag == 11; const bool tog11 = screen_data.ChangeFilamentScreen.e_tag == 11;
#endif #endif
#ifdef TOUCH_UI_PORTRAIT #ifdef TOUCH_UI_PORTRAIT

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && HOTENDS > 1 #if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_MULTI_HOTEND
#include "screens.h" #include "screens.h"

View File

@ -72,7 +72,7 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) {
w.text_field(0, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), str); w.text_field(0, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), str);
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
format_position(str, getNozzleOffset_mm(X, E1), getNozzleOffset_mm(Y, E1), getNozzleOffset_mm(Z, E1)); format_position(str, getNozzleOffset_mm(X, E1), getNozzleOffset_mm(Y, E1), getNozzleOffset_mm(Z, E1));
w.text_field(0, GET_TEXT_F(MSG_OFFSETS_MENU), str); w.text_field(0, GET_TEXT_F(MSG_OFFSETS_MENU), str);
#endif #endif

View File

@ -68,7 +68,7 @@ SCREEN_TABLE {
#if HAS_BED_PROBE #if HAS_BED_PROBE
DECL_SCREEN(ZOffsetScreen), DECL_SCREEN(ZOffsetScreen),
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
DECL_SCREEN(NozzleOffsetScreen), DECL_SCREEN(NozzleOffsetScreen),
#endif #endif
#if ENABLED(BACKLASH_GCODE) #if ENABLED(BACKLASH_GCODE)

View File

@ -514,7 +514,7 @@ class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEP
}; };
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<NOZZLE_OFFSET_SCREEN_CACHE> { class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<NOZZLE_OFFSET_SCREEN_CACHE> {
public: public:
static void onEntry(); static void onEntry();

View File

@ -78,7 +78,7 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) {
case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; case 2: UI_DECREMENT(TargetTemp_celsius, E0); break;
case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; case 3: UI_INCREMENT(TargetTemp_celsius, E0); break;
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; case 4: UI_DECREMENT(TargetTemp_celsius, E1); break;
case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; case 5: UI_INCREMENT(TargetTemp_celsius, E1); break;
#endif #endif

View File

@ -192,7 +192,7 @@ namespace ExtUI {
case CHAMBER: return; // Chamber has no idle timer case CHAMBER: return; // Chamber has no idle timer
#endif #endif
default: default:
#if HOTENDS #if HAS_HOTEND
thermalManager.reset_hotend_idle_timer(heater - H0); thermalManager.reset_hotend_idle_timer(heater - H0);
#endif #endif
break; break;
@ -258,7 +258,7 @@ namespace ExtUI {
case CHAMBER: return false; // Chamber has no idle timer case CHAMBER: return false; // Chamber has no idle timer
#endif #endif
default: default:
#if HOTENDS #if HAS_HOTEND
return thermalManager.hotend_idle[heater - H0].timed_out; return thermalManager.hotend_idle[heater - H0].timed_out;
#else #else
return false; return false;
@ -985,7 +985,7 @@ namespace ExtUI {
else else
#endif #endif
{ {
#if HOTENDS #if HAS_HOTEND
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
const int16_t e = heater - H0; const int16_t e = heater - H0;
thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e); thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e);
@ -997,7 +997,7 @@ namespace ExtUI {
#ifdef TOUCH_UI_LCD_TEMP_SCALING #ifdef TOUCH_UI_LCD_TEMP_SCALING
value *= TOUCH_UI_LCD_TEMP_SCALING; value *= TOUCH_UI_LCD_TEMP_SCALING;
#endif #endif
#if HOTENDS #if HAS_HOTEND
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
const int16_t e = extruder - E0; const int16_t e = extruder - E0;
enableHeater(extruder); enableHeater(extruder);

View File

@ -29,7 +29,7 @@
extern int8_t encoderLine, encoderTopLine, screen_items; extern int8_t encoderLine, encoderTopLine, screen_items;
#if HOTENDS #if HAS_HOTEND
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
#endif #endif

View File

@ -233,9 +233,9 @@ void menu_cancelobject();
#define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N); #define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N);
#endif #endif
#if HOTENDS #if HAS_HOTEND
DEFINE_PIDTEMP_FUNCS(0); DEFINE_PIDTEMP_FUNCS(0);
#if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND) #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
REPEAT_S(1, HOTENDS, DEFINE_PIDTEMP_FUNCS) REPEAT_S(1, HOTENDS, DEFINE_PIDTEMP_FUNCS)
#endif #endif
#endif #endif
@ -308,7 +308,7 @@ void menu_cancelobject();
#endif #endif
PID_EDIT_MENU_ITEMS(0); PID_EDIT_MENU_ITEMS(0);
#if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND) #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS) REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
#endif #endif

View File

@ -48,7 +48,7 @@ uint8_t MarlinUI::preheat_fan_speed[2];
// //
void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb, const uint8_t fan) { void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb, const uint8_t fan) {
#if HOTENDS #if HAS_HOTEND
if (temph > 0) thermalManager.setTargetHotend(_MIN(heater_maxtemp[endnum] - 15, temph), endnum); if (temph > 0) thermalManager.setTargetHotend(_MIN(heater_maxtemp[endnum] - 15, temph), endnum);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -107,7 +107,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#else #else
ACTION_ITEM(MSG_PREHEAT_1, []{ _preheat_end(0, 0); }); ACTION_ITEM(MSG_PREHEAT_1, []{ _preheat_end(0, 0); });
#endif #endif
#elif HOTENDS > 1 #elif HAS_MULTI_HOTEND
#if HAS_HEATED_BED #if HAS_HEATED_BED
_PREHEAT_ITEMS(1,0); _PREHEAT_ITEMS(1,0);
#endif #endif
@ -118,7 +118,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#endif #endif
HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], e); HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], e);
}); });
#endif // HOTENDS > 1 #endif // HAS_MULTI_HOTEND
#if HAS_HEATED_BED #if HAS_HEATED_BED
ACTION_ITEM(MSG_PREHEAT_1_BEDONLY, []{ _preheat_bed(0); }); ACTION_ITEM(MSG_PREHEAT_1_BEDONLY, []{ _preheat_bed(0); });
#endif #endif
@ -135,7 +135,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#else #else
ACTION_ITEM(MSG_PREHEAT_2, []{ _preheat_end(1, 0); }); ACTION_ITEM(MSG_PREHEAT_2, []{ _preheat_end(1, 0); });
#endif #endif
#elif HOTENDS > 1 #elif HAS_MULTI_HOTEND
#if HAS_HEATED_BED #if HAS_HEATED_BED
_PREHEAT_ITEMS(2,0); _PREHEAT_ITEMS(2,0);
#endif #endif
@ -146,7 +146,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#endif #endif
HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], e); HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], e);
}); });
#endif // HOTENDS > 1 #endif // HAS_MULTI_HOTEND
#if HAS_HEATED_BED #if HAS_HEATED_BED
ACTION_ITEM(MSG_PREHEAT_2_BEDONLY, []{ _preheat_bed(1); }); ACTION_ITEM(MSG_PREHEAT_2_BEDONLY, []{ _preheat_bed(1); });
#endif #endif
@ -171,7 +171,7 @@ void menu_temperature() {
// //
#if HOTENDS == 1 #if HOTENDS == 1
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); }); EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
#elif HOTENDS > 1 #elif HAS_MULTI_HOTEND
HOTEND_LOOP() HOTEND_LOOP()
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
#endif #endif

View File

@ -127,7 +127,7 @@ void menu_tune() {
// //
#if HOTENDS == 1 #if HOTENDS == 1
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); }); EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
#elif HOTENDS > 1 #elif HAS_MULTI_HOTEND
HOTEND_LOOP() HOTEND_LOOP()
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
#endif #endif

View File

@ -3194,7 +3194,7 @@ void MarlinSettings::reset() {
HOTEND_LOOP() { HOTEND_LOOP() {
CONFIG_ECHO_START(); CONFIG_ECHO_START();
SERIAL_ECHOPAIR_P( SERIAL_ECHOPAIR_P(
#if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND) #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
PSTR(" M301 E"), e, PSTR(" M301 E"), e,
SP_P_STR SP_P_STR
#else #else

View File

@ -140,7 +140,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
bool Temperature::adaptive_fan_slowing = true; bool Temperature::adaptive_fan_slowing = true;
#endif #endif
#if HOTENDS #if HAS_HOTEND
hotend_info_t Temperature::temp_hotend[HOTEND_TEMPS]; // = { 0 } hotend_info_t Temperature::temp_hotend[HOTEND_TEMPS]; // = { 0 }
#endif #endif
@ -298,7 +298,7 @@ volatile bool Temperature::raw_temps_ready = false;
#define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) < (HEATER_##N##_RAW_HI_TEMP) ? 1 : -1) #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) < (HEATER_##N##_RAW_HI_TEMP) ? 1 : -1)
#if HOTENDS #if HAS_HOTEND
// Init mintemp and maxtemp with extreme values to prevent false errors during startup // Init mintemp and maxtemp with extreme values to prevent false errors during startup
constexpr temp_range_t sensor_heater_0 { HEATER_0_RAW_LO_TEMP, HEATER_0_RAW_HI_TEMP, 0, 16383 }, constexpr temp_range_t sensor_heater_0 { HEATER_0_RAW_LO_TEMP, HEATER_0_RAW_HI_TEMP, 0, 16383 },
sensor_heater_1 { HEATER_1_RAW_LO_TEMP, HEATER_1_RAW_HI_TEMP, 0, 16383 }, sensor_heater_1 { HEATER_1_RAW_LO_TEMP, HEATER_1_RAW_HI_TEMP, 0, 16383 },
@ -655,7 +655,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) {
#endif #endif
default: default:
return (0 return (0
#if HOTENDS #if HAS_HOTEND
+ temp_hotend[heater_id].soft_pwm_amount + temp_hotend[heater_id].soft_pwm_amount
#endif #endif
); );
@ -672,7 +672,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) {
#define _EFAN(B,A) _EFANOVERLAP(A,B) ? B : #define _EFAN(B,A) _EFANOVERLAP(A,B) ? B :
static const uint8_t fanBit[] PROGMEM = { static const uint8_t fanBit[] PROGMEM = {
0 0
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#define _NEXT_FAN(N) , REPEAT2(N,_EFAN,N) N #define _NEXT_FAN(N) , REPEAT2(N,_EFAN,N) N
RREPEAT_S(1, HOTENDS, _NEXT_FAN) RREPEAT_S(1, HOTENDS, _NEXT_FAN)
#endif #endif
@ -821,7 +821,7 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
_temp_error(heater, PSTR(STR_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP)); _temp_error(heater, PSTR(STR_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP));
} }
#if HOTENDS #if HAS_HOTEND
#if ENABLED(PID_DEBUG) #if ENABLED(PID_DEBUG)
extern bool pid_debug_flag; extern bool pid_debug_flag;
#endif #endif
@ -1036,7 +1036,7 @@ void Temperature::manage_heater() {
millis_t ms = millis(); millis_t ms = millis();
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() { HOTEND_LOOP() {
#if ENABLED(THERMAL_PROTECTION_HOTENDS) #if ENABLED(THERMAL_PROTECTION_HOTENDS)
@ -1384,7 +1384,7 @@ void Temperature::manage_heater() {
} }
#endif #endif
#if HOTENDS #if HAS_HOTEND
// Derived from RepRap FiveD extruder::getTemperature() // Derived from RepRap FiveD extruder::getTemperature()
// For hot end temperature measurement. // For hot end temperature measurement.
float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) {
@ -1575,7 +1575,7 @@ void Temperature::updateTemperaturesFromRawValues() {
#if ENABLED(HEATER_1_USES_MAX6675) #if ENABLED(HEATER_1_USES_MAX6675)
temp_hotend[1].raw = READ_MAX6675(1); temp_hotend[1].raw = READ_MAX6675(1);
#endif #endif
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() temp_hotend[e].celsius = analog_to_celsius_hotend(temp_hotend[e].raw, e); HOTEND_LOOP() temp_hotend[e].celsius = analog_to_celsius_hotend(temp_hotend[e].raw, e);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -1836,7 +1836,7 @@ void Temperature::init() {
// Wait for temperature measurement to settle // Wait for temperature measurement to settle
delay(250); delay(250);
#if HOTENDS #if HAS_HOTEND
#define _TEMP_MIN_E(NR) do{ \ #define _TEMP_MIN_E(NR) do{ \
temp_range[NR].mintemp = HEATER_ ##NR## _MINTEMP; \ temp_range[NR].mintemp = HEATER_ ##NR## _MINTEMP; \
@ -1855,7 +1855,7 @@ void Temperature::init() {
#ifdef HEATER_0_MAXTEMP #ifdef HEATER_0_MAXTEMP
_TEMP_MAX_E(0); _TEMP_MAX_E(0);
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#ifdef HEATER_1_MINTEMP #ifdef HEATER_1_MINTEMP
_TEMP_MIN_E(1); _TEMP_MIN_E(1);
#endif #endif
@ -1910,7 +1910,7 @@ void Temperature::init() {
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HAS_MULTI_HOTEND
#endif // HOTENDS #endif // HOTENDS
@ -2070,7 +2070,7 @@ void Temperature::disable_all_heaters() {
planner.autotemp_enabled = false; planner.autotemp_enabled = false;
#endif #endif
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() setTargetHotend(0, e); HOTEND_LOOP() setTargetHotend(0, e);
#endif #endif
@ -2113,7 +2113,7 @@ void Temperature::disable_all_heaters() {
#if ENABLED(PRINTJOB_TIMER_AUTOSTART) #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
bool Temperature::over_autostart_threshold() { bool Temperature::over_autostart_threshold() {
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true; HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true;
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -2358,7 +2358,7 @@ void Temperature::readings_ready() {
filwidth.reading_ready(); filwidth.reading_ready();
#endif #endif
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() temp_hotend[e].reset(); HOTEND_LOOP() temp_hotend[e].reset();
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
temp_hotend[1].reset(); temp_hotend[1].reset();
@ -2387,7 +2387,7 @@ void Temperature::readings_ready() {
joystick.z.reset(); joystick.z.reset();
#endif #endif
#if HOTENDS #if HAS_HOTEND
static constexpr int8_t temp_dir[] = { static constexpr int8_t temp_dir[] = {
#if ENABLED(HEATER_0_USES_MAX6675) #if ENABLED(HEATER_0_USES_MAX6675)
@ -2395,7 +2395,7 @@ void Temperature::readings_ready() {
#else #else
TEMPDIR(0) TEMPDIR(0)
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#define _TEMPDIR(N) , TEMPDIR(N) #define _TEMPDIR(N) , TEMPDIR(N)
#if ENABLED(HEATER_1_USES_MAX6675) #if ENABLED(HEATER_1_USES_MAX6675)
, 0 , 0
@ -2405,7 +2405,7 @@ void Temperature::readings_ready() {
#if HOTENDS > 2 #if HOTENDS > 2
REPEAT_S(2, HOTENDS, _TEMPDIR) REPEAT_S(2, HOTENDS, _TEMPDIR)
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HAS_MULTI_HOTEND
}; };
LOOP_L_N(e, COUNT(temp_dir)) { LOOP_L_N(e, COUNT(temp_dir)) {
@ -2531,7 +2531,7 @@ void Temperature::tick() {
static bool ADCKey_pressed = false; static bool ADCKey_pressed = false;
#endif #endif
#if HOTENDS #if HAS_HOTEND
static SoftPWM soft_pwm_hotend[HOTENDS]; static SoftPWM soft_pwm_hotend[HOTENDS];
#endif #endif
@ -2565,7 +2565,7 @@ void Temperature::tick() {
if (pwm_count_tmp >= 127) { if (pwm_count_tmp >= 127) {
pwm_count_tmp -= 127; pwm_count_tmp -= 127;
#if HOTENDS #if HAS_HOTEND
#define _PWM_MOD_E(N) _PWM_MOD(N,soft_pwm_hotend[N],temp_hotend[N]); #define _PWM_MOD_E(N) _PWM_MOD(N,soft_pwm_hotend[N],temp_hotend[N]);
REPEAT(HOTENDS, _PWM_MOD_E); REPEAT(HOTENDS, _PWM_MOD_E);
#endif #endif
@ -2612,7 +2612,7 @@ void Temperature::tick() {
} }
else { else {
#define _PWM_LOW(N,S) do{ if (S.count <= pwm_count_tmp) WRITE_HEATER_##N(LOW); }while(0) #define _PWM_LOW(N,S) do{ if (S.count <= pwm_count_tmp) WRITE_HEATER_##N(LOW); }while(0)
#if HOTENDS #if HAS_HOTEND
#define _PWM_LOW_E(N) _PWM_LOW(N, soft_pwm_hotend[N]); #define _PWM_LOW_E(N) _PWM_LOW(N, soft_pwm_hotend[N]);
REPEAT(HOTENDS, _PWM_LOW_E); REPEAT(HOTENDS, _PWM_LOW_E);
#endif #endif
@ -2678,7 +2678,7 @@ void Temperature::tick() {
if (slow_pwm_count == 0) { if (slow_pwm_count == 0) {
#if HOTENDS #if HAS_HOTEND
#define _SLOW_PWM_E(N) _SLOW_PWM(N, soft_pwm_hotend[N], temp_hotend[N]); #define _SLOW_PWM_E(N) _SLOW_PWM(N, soft_pwm_hotend[N], temp_hotend[N]);
REPEAT(HOTENDS, _SLOW_PWM_E); REPEAT(HOTENDS, _SLOW_PWM_E);
#endif #endif
@ -2689,7 +2689,7 @@ void Temperature::tick() {
} // slow_pwm_count == 0 } // slow_pwm_count == 0
#if HOTENDS #if HAS_HOTEND
#define _PWM_OFF_E(N) _PWM_OFF(N, soft_pwm_hotend[N]); #define _PWM_OFF_E(N) _PWM_OFF(N, soft_pwm_hotend[N]);
REPEAT(HOTENDS, _PWM_OFF_E); REPEAT(HOTENDS, _PWM_OFF_E);
#endif #endif
@ -2772,7 +2772,7 @@ void Temperature::tick() {
slow_pwm_count++; slow_pwm_count++;
slow_pwm_count &= 0x7F; slow_pwm_count &= 0x7F;
#if HOTENDS #if HAS_HOTEND
HOTEND_LOOP() soft_pwm_hotend[e].dec(); HOTEND_LOOP() soft_pwm_hotend[e].dec();
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -2990,7 +2990,7 @@ void Temperature::tick() {
} }
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_CHAR(k); SERIAL_CHAR(k);
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
if (e >= 0) SERIAL_CHAR('0' + e); if (e >= 0) SERIAL_CHAR('0' + e);
#endif #endif
SERIAL_CHAR(':'); SERIAL_CHAR(':');
@ -3052,7 +3052,7 @@ void Temperature::tick() {
, H_PROBE , H_PROBE
); );
#endif // HAS_TEMP_PROBE #endif // HAS_TEMP_PROBE
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e) HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e)
#if ENABLED(SHOW_TEMP_ADC_VALUES) #if ENABLED(SHOW_TEMP_ADC_VALUES)
, rawHotendTemp(e) , rawHotendTemp(e)
@ -3067,7 +3067,7 @@ void Temperature::tick() {
#if HAS_HEATED_CHAMBER #if HAS_HEATED_CHAMBER
SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER)); SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER));
#endif #endif
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
HOTEND_LOOP() { HOTEND_LOOP() {
SERIAL_ECHOPAIR(" @", e); SERIAL_ECHOPAIR(" @", e);
SERIAL_CHAR(':'); SERIAL_CHAR(':');
@ -3096,7 +3096,7 @@ void Temperature::tick() {
void Temperature::set_heating_message(const uint8_t e) { void Temperature::set_heating_message(const uint8_t e) {
const bool heating = isHeatingHotend(e); const bool heating = isHeatingHotend(e);
ui.status_printf_P(0, ui.status_printf_P(0,
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
PSTR("E%c " S_FMT), '1' + e PSTR("E%c " S_FMT), '1' + e
#else #else
PSTR("E " S_FMT) PSTR("E " S_FMT)

View File

@ -317,12 +317,12 @@ class Temperature {
public: public:
#if HOTENDS
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
#define HOTEND_TEMPS (HOTENDS + 1) #define HOTEND_TEMPS (HOTENDS + 1)
#else #else
#define HOTEND_TEMPS HOTENDS #define HOTEND_TEMPS HOTENDS
#endif #endif
#if HAS_HOTEND
static hotend_info_t temp_hotend[HOTEND_TEMPS]; static hotend_info_t temp_hotend[HOTEND_TEMPS];
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
@ -496,7 +496,7 @@ class Temperature {
} }
#endif #endif
#if HOTENDS #if HAS_HOTEND
static float analog_to_celsius_hotend(const int raw, const uint8_t e); static float analog_to_celsius_hotend(const int raw, const uint8_t e);
#endif #endif
@ -624,7 +624,7 @@ class Temperature {
static inline void start_watching_hotend(const uint8_t=0) {} static inline void start_watching_hotend(const uint8_t=0) {}
#endif #endif
#if HOTENDS #if HAS_HOTEND
static void setTargetHotend(const int16_t celsius, const uint8_t E_NAME) { static void setTargetHotend(const int16_t celsius, const uint8_t E_NAME) {
const uint8_t ee = HOTEND_INDEX; const uint8_t ee = HOTEND_INDEX;

View File

@ -142,7 +142,7 @@
// Augmentation for auto-assigning RAMPS plugs // Augmentation for auto-assigning RAMPS plugs
// //
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_RAMPS_EEB #define IS_RAMPS_EEB
#else #else

View File

@ -184,7 +184,7 @@
// Augmentation for auto-assigning RAMPS plugs // Augmentation for auto-assigning RAMPS plugs
// //
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_RAMPS_EEB #define IS_RAMPS_EEB
#else #else

View File

@ -159,7 +159,7 @@
#define HBP_PIN 45 // L4 #define HBP_PIN 45 // L4
#define EXTRA_FET_PIN 44 // L5 #define EXTRA_FET_PIN 44 // L5
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_EEB #define IS_EEB
#else #else

View File

@ -124,7 +124,7 @@
// Augmentation for auto-assigning RAMPS plugs // Augmentation for auto-assigning RAMPS plugs
// //
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_RAMPS_EEB #define IS_RAMPS_EEB
#else #else

View File

@ -130,7 +130,7 @@
// Augmentation for auto-assigning RAMPS plugs // Augmentation for auto-assigning RAMPS plugs
// //
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_RAMPS_EEB #define IS_RAMPS_EEB
#else #else

View File

@ -180,7 +180,7 @@
// Augmentation for auto-assigning RAMPS plugs // Augmentation for auto-assigning RAMPS plugs
// //
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#if TEMP_SENSOR_BED #if TEMP_SENSOR_BED
#define IS_RAMPS_EEB #define IS_RAMPS_EEB
#else #else

View File

@ -59,7 +59,7 @@
#define RAMPS_D10_PIN TG_HEATER_0_PIN // HEATER_0_PIN is always RAMPS_D10_PIN in pins_RAMPS.h #define RAMPS_D10_PIN TG_HEATER_0_PIN // HEATER_0_PIN is always RAMPS_D10_PIN in pins_RAMPS.h
#if HOTENDS > 1 // EEF and EEB #if HAS_MULTI_HOTEND // EEF and EEB
#define RAMPS_D9_PIN TG_HEATER_1_PIN #define RAMPS_D9_PIN TG_HEATER_1_PIN
#if !TEMP_SENSOR_BED #if !TEMP_SENSOR_BED
// EEF // EEF
@ -79,7 +79,7 @@
#define RAMPS_D8_PIN TG_FAN0_PIN #define RAMPS_D8_PIN TG_FAN0_PIN
#endif #endif
#if HOTENDS > 1 || TEMP_SENSOR_BED // EEF, EEB, EFB #if HAS_MULTI_HOTEND || TEMP_SENSOR_BED // EEF, EEB, EFB
#define FAN1_PIN TG_FAN1_PIN #define FAN1_PIN TG_FAN1_PIN
#endif #endif
#define FAN2_PIN TG_FAN2_PIN #define FAN2_PIN TG_FAN2_PIN

View File

@ -423,10 +423,10 @@
#define _H6_PINS #define _H6_PINS
#define _H7_PINS #define _H7_PINS
#if HOTENDS #if HAS_HOTEND
#undef _H0_PINS #undef _H0_PINS
#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN), #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN),
#if HOTENDS > 1 #if HAS_MULTI_HOTEND
#undef _H1_PINS #undef _H1_PINS
#define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN), #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN),
#if HOTENDS > 2 #if HOTENDS > 2
@ -453,7 +453,7 @@
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HAS_MULTI_HOTEND
#endif // HOTENDS #endif // HOTENDS
// //