mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
Add HAS_TEMP_HOTEND define
This commit is contained in:
parent
cf9a171aa9
commit
d24f14a799
@ -581,6 +581,8 @@
|
||||
|
||||
#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
|
||||
|
||||
#define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
|
||||
|
||||
/**
|
||||
* Helper Macros for heaters and extruder fan
|
||||
*/
|
||||
|
@ -368,7 +368,7 @@ extern uint8_t active_extruder;
|
||||
extern void digipot_i2c_init();
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
void print_heaterstates();
|
||||
#endif
|
||||
|
||||
|
@ -4100,10 +4100,10 @@ inline void gcode_M104() {
|
||||
if (print_job_stop()) LCD_MESSAGEPGM(WELCOME_MSG);
|
||||
}
|
||||
|
||||
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
|
||||
void print_heaterstates() {
|
||||
#if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND
|
||||
SERIAL_PROTOCOLPGM(" T:");
|
||||
SERIAL_PROTOCOL_F(degHotend(target_extruder), 1);
|
||||
SERIAL_PROTOCOLPGM(" /");
|
||||
@ -4179,10 +4179,10 @@ inline void gcode_M104() {
|
||||
inline void gcode_M105() {
|
||||
if (setTargetedHotend(105)) return;
|
||||
|
||||
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
SERIAL_PROTOCOLPGM(MSG_OK);
|
||||
print_heaterstates();
|
||||
#else // !HAS_TEMP_0 && !HAS_TEMP_BED
|
||||
#else // !HAS_TEMP_HOTEND && !HAS_TEMP_BED
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS);
|
||||
#endif
|
||||
@ -4271,7 +4271,7 @@ inline void gcode_M109() {
|
||||
now = millis();
|
||||
if (now > next_temp_ms) { //Print temp & remaining time every 1s while waiting
|
||||
next_temp_ms = now + 1000UL;
|
||||
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
print_heaterstates();
|
||||
#endif
|
||||
#ifdef TEMP_RESIDENCY_TIME
|
||||
|
@ -350,7 +350,7 @@ void PID_autotune(float temp, int extruder, int ncycles, bool set_result/*=false
|
||||
}
|
||||
// Every 2 seconds...
|
||||
if (ms > temp_ms + 2000) {
|
||||
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
print_heaterstates();
|
||||
SERIAL_EOL;
|
||||
#endif
|
||||
@ -1183,7 +1183,7 @@ void disable_all_heaters() {
|
||||
WRITE_HEATER_ ## NR (LOW); \
|
||||
}
|
||||
|
||||
#if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)
|
||||
#if HAS_TEMP_HOTEND
|
||||
setTargetHotend(0, 0);
|
||||
soft_pwm[0] = 0;
|
||||
WRITE_HEATER_0P(LOW); // Should HEATERS_PARALLEL apply here? Then change to DISABLE_HEATER(0)
|
||||
|
Loading…
Reference in New Issue
Block a user