Apply more HAS_HOTEND
This commit is contained in:
parent
94291eb59f
commit
01c646a892
@ -74,7 +74,7 @@ bool Power::is_power_needed() {
|
|||||||
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
|
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0) return true;
|
||||||
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0)) return true;
|
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0)) return true;
|
||||||
|
|
||||||
#if HOTENDS && AUTO_POWER_E_TEMP
|
#if HAS_HOTEND && AUTO_POWER_E_TEMP
|
||||||
HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;
|
HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
|||||||
case 120: M120(); break; // M120: Enable endstops
|
case 120: M120(); break; // M120: Enable endstops
|
||||||
case 121: M121(); break; // M121: Disable endstops
|
case 121: M121(); break; // M121: Disable endstops
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
case 145: M145(); break; // M145: Set material heatup parameters
|
case 145: M145(); break; // M145: Set material heatup parameters
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -602,7 +602,7 @@ private:
|
|||||||
static void M191();
|
static void M191();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
static void M145();
|
static void M145();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
|
|
||||||
#include "../gcode.h"
|
#include "../gcode.h"
|
||||||
#include "../../lcd/ultralcd.h"
|
#include "../../lcd/ultralcd.h"
|
||||||
|
@ -1653,7 +1653,7 @@
|
|||||||
#define HAS_TEMP_ADC_CHAMBER 1
|
#define HAS_TEMP_ADC_CHAMBER 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HOTENDS && EITHER(HAS_TEMP_ADC_0, HEATER_0_USES_MAX6675)
|
#if HAS_HOTEND && EITHER(HAS_TEMP_ADC_0, HEATER_0_USES_MAX6675)
|
||||||
#define HAS_TEMP_HOTEND 1
|
#define HAS_TEMP_HOTEND 1
|
||||||
#endif
|
#endif
|
||||||
#define HAS_TEMP_BED HAS_TEMP_ADC_BED
|
#define HAS_TEMP_BED HAS_TEMP_ADC_BED
|
||||||
|
@ -1749,7 +1749,7 @@
|
|||||||
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
|
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
|
||||||
#define DO_DRAW_FAN 1
|
#define DO_DRAW_FAN 1
|
||||||
#endif
|
#endif
|
||||||
#if HOTENDS && ENABLED(STATUS_HOTEND_ANIM)
|
#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM)
|
||||||
#define ANIM_HOTEND 1
|
#define ANIM_HOTEND 1
|
||||||
#endif
|
#endif
|
||||||
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
|
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
|
||||||
|
@ -169,7 +169,7 @@ namespace ExtUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void enableHeater(const extruder_t extruder) {
|
void enableHeater(const extruder_t extruder) {
|
||||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
#if HAS_HOTEND && HEATER_IDLE_HANDLER
|
||||||
thermalManager.reset_hotend_idle_timer(extruder - E0);
|
thermalManager.reset_hotend_idle_timer(extruder - E0);
|
||||||
#else
|
#else
|
||||||
UNUSED(extruder);
|
UNUSED(extruder);
|
||||||
@ -234,7 +234,7 @@ namespace ExtUI {
|
|||||||
|
|
||||||
bool isHeaterIdle(const extruder_t extruder) {
|
bool isHeaterIdle(const extruder_t extruder) {
|
||||||
return false
|
return false
|
||||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
#if HAS_HOTEND && HEATER_IDLE_HANDLER
|
||||||
|| thermalManager.hotend_idle[extruder - E0].timed_out
|
|| thermalManager.hotend_idle[extruder - E0].timed_out
|
||||||
#else
|
#else
|
||||||
; UNUSED(extruder)
|
; UNUSED(extruder)
|
||||||
@ -746,13 +746,13 @@ namespace ExtUI {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
float getZOffset_mm() {
|
float getZOffset_mm() {
|
||||||
|
return (0.0f
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
return probe.offset.z;
|
+ probe.offset.z
|
||||||
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||||
return (planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]);
|
+ planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
|
||||||
#else
|
|
||||||
return 0.0;
|
|
||||||
#endif
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setZOffset_mm(const float value) {
|
void setZOffset_mm(const float value) {
|
||||||
@ -857,17 +857,9 @@ namespace ExtUI {
|
|||||||
float getFeedrate_percent() { return feedrate_percentage; }
|
float getFeedrate_percent() { return feedrate_percentage; }
|
||||||
|
|
||||||
#if ENABLED(PIDTEMP)
|
#if ENABLED(PIDTEMP)
|
||||||
float getPIDValues_Kp(const extruder_t tool) {
|
float getPIDValues_Kp(const extruder_t tool) { return PID_PARAM(Kp, tool); }
|
||||||
return PID_PARAM(Kp, tool);
|
float getPIDValues_Ki(const extruder_t tool) { return unscalePID_i(PID_PARAM(Ki, tool)); }
|
||||||
}
|
float getPIDValues_Kd(const extruder_t tool) { return unscalePID_d(PID_PARAM(Kd, tool)); }
|
||||||
|
|
||||||
float getPIDValues_Ki(const extruder_t tool) {
|
|
||||||
return unscalePID_i(PID_PARAM(Ki, tool));
|
|
||||||
}
|
|
||||||
|
|
||||||
float getPIDValues_Kd(const extruder_t tool) {
|
|
||||||
return unscalePID_d(PID_PARAM(Kd, tool));
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
||||||
thermalManager.temp_hotend[tool].pid.Kp = p;
|
thermalManager.temp_hotend[tool].pid.Kp = p;
|
||||||
@ -882,17 +874,9 @@ namespace ExtUI {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PIDTEMPBED)
|
#if ENABLED(PIDTEMPBED)
|
||||||
float getBedPIDValues_Kp() {
|
float getBedPIDValues_Kp() { return thermalManager.temp_bed.pid.Kp; }
|
||||||
return thermalManager.temp_bed.pid.Kp;
|
float getBedPIDValues_Ki() { return unscalePID_i(thermalManager.temp_bed.pid.Ki); }
|
||||||
}
|
float getBedPIDValues_Kd() { return unscalePID_d(thermalManager.temp_bed.pid.Kd); }
|
||||||
|
|
||||||
float getBedPIDValues_Ki() {
|
|
||||||
return unscalePID_i(thermalManager.temp_bed.pid.Ki);
|
|
||||||
}
|
|
||||||
|
|
||||||
float getBedPIDValues_Kd() {
|
|
||||||
return unscalePID_d(thermalManager.temp_bed.pid.Kd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setBedPIDValues(const float p, const float i, const float d) {
|
void setBedPIDValues(const float p, const float i, const float d) {
|
||||||
thermalManager.temp_bed.pid.Kp = p;
|
thermalManager.temp_bed.pid.Kp = p;
|
||||||
@ -906,20 +890,12 @@ namespace ExtUI {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void injectCommands_P(PGM_P const gcode) {
|
void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
|
||||||
queue.inject_P(gcode);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
||||||
|
|
||||||
bool isAxisPositionKnown(const axis_t axis) {
|
bool isAxisPositionKnown(const axis_t axis) { return TEST(axis_known_position, axis); }
|
||||||
return TEST(axis_known_position, axis);
|
bool isAxisPositionKnown(const extruder_t) { return TEST(axis_known_position, E_AXIS); }
|
||||||
}
|
|
||||||
|
|
||||||
bool isAxisPositionKnown(const extruder_t) {
|
|
||||||
return TEST(axis_known_position, E_AXIS);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isPositionKnown() { return all_axes_known(); }
|
bool isPositionKnown() { return all_axes_known(); }
|
||||||
bool isMachineHomed() { return all_axes_homed(); }
|
bool isMachineHomed() { return all_axes_homed(); }
|
||||||
|
|
||||||
@ -1008,17 +984,9 @@ namespace ExtUI {
|
|||||||
return IFSD(IS_SD_INSERTED() && card.isMounted(), false);
|
return IFSD(IS_SD_INSERTED() && card.isMounted(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pausePrint() {
|
void pausePrint() { ui.pause_print(); }
|
||||||
ui.pause_print();
|
void resumePrint() { ui.resume_print(); }
|
||||||
}
|
void stopPrint() { ui.abort_print(); }
|
||||||
|
|
||||||
void resumePrint() {
|
|
||||||
ui.resume_print();
|
|
||||||
}
|
|
||||||
|
|
||||||
void stopPrint() {
|
|
||||||
ui.abort_print();
|
|
||||||
}
|
|
||||||
|
|
||||||
void onUserConfirmRequired_P(PGM_P const pstr) {
|
void onUserConfirmRequired_P(PGM_P const pstr) {
|
||||||
char msg[strlen_P(pstr) + 1];
|
char msg[strlen_P(pstr) + 1];
|
||||||
|
@ -799,7 +799,7 @@ void MarlinSettings::postprocess() {
|
|||||||
{
|
{
|
||||||
_FIELD_TEST(ui_preheat_hotend_temp);
|
_FIELD_TEST(ui_preheat_hotend_temp);
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
const int16_t (&ui_preheat_hotend_temp)[2] = ui.preheat_hotend_temp,
|
const int16_t (&ui_preheat_hotend_temp)[2] = ui.preheat_hotend_temp,
|
||||||
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
||||||
const uint8_t (&ui_preheat_fan_speed)[2] = ui.preheat_fan_speed;
|
const uint8_t (&ui_preheat_fan_speed)[2] = ui.preheat_fan_speed;
|
||||||
@ -1649,7 +1649,7 @@ void MarlinSettings::postprocess() {
|
|||||||
{
|
{
|
||||||
_FIELD_TEST(ui_preheat_hotend_temp);
|
_FIELD_TEST(ui_preheat_hotend_temp);
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
int16_t (&ui_preheat_hotend_temp)[2] = ui.preheat_hotend_temp,
|
int16_t (&ui_preheat_hotend_temp)[2] = ui.preheat_hotend_temp,
|
||||||
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
||||||
uint8_t (&ui_preheat_fan_speed)[2] = ui.preheat_fan_speed;
|
uint8_t (&ui_preheat_fan_speed)[2] = ui.preheat_fan_speed;
|
||||||
@ -2557,7 +2557,7 @@ void MarlinSettings::reset() {
|
|||||||
// Preheat parameters
|
// Preheat parameters
|
||||||
//
|
//
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
ui.preheat_hotend_temp[0] = PREHEAT_1_TEMP_HOTEND;
|
ui.preheat_hotend_temp[0] = PREHEAT_1_TEMP_HOTEND;
|
||||||
ui.preheat_hotend_temp[1] = PREHEAT_2_TEMP_HOTEND;
|
ui.preheat_hotend_temp[1] = PREHEAT_2_TEMP_HOTEND;
|
||||||
ui.preheat_bed_temp[0] = PREHEAT_1_TEMP_BED;
|
ui.preheat_bed_temp[0] = PREHEAT_1_TEMP_BED;
|
||||||
@ -3077,7 +3077,7 @@ void MarlinSettings::reset() {
|
|||||||
|
|
||||||
#endif // [XYZ]_DUAL_ENDSTOPS
|
#endif // [XYZ]_DUAL_ENDSTOPS
|
||||||
|
|
||||||
#if HOTENDS && HAS_LCD_MENU
|
#if HAS_HOTEND && HAS_LCD_MENU
|
||||||
|
|
||||||
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
||||||
LOOP_L_N(i, COUNT(ui.preheat_hotend_temp)) {
|
LOOP_L_N(i, COUNT(ui.preheat_hotend_temp)) {
|
||||||
|
@ -2386,7 +2386,7 @@ void Temperature::tick() {
|
|||||||
|
|
||||||
#if DISABLED(SLOW_PWM_HEATERS)
|
#if DISABLED(SLOW_PWM_HEATERS)
|
||||||
|
|
||||||
#if HOTENDS || HAS_HEATED_BED || HAS_HEATED_CHAMBER
|
#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER
|
||||||
constexpr uint8_t pwm_mask =
|
constexpr uint8_t pwm_mask =
|
||||||
#if ENABLED(SOFT_PWM_DITHER)
|
#if ENABLED(SOFT_PWM_DITHER)
|
||||||
_BV(SOFT_PWM_SCALE) - 1
|
_BV(SOFT_PWM_SCALE) - 1
|
||||||
@ -2931,7 +2931,7 @@ void Temperature::tick() {
|
|||||||
|
|
||||||
#endif // AUTO_REPORT_TEMPERATURES
|
#endif // AUTO_REPORT_TEMPERATURES
|
||||||
|
|
||||||
#if HOTENDS && HAS_DISPLAY
|
#if HAS_HOTEND && HAS_DISPLAY
|
||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user