Apply more HAS_HOTEND
This commit is contained in:
parent
94291eb59f
commit
01c646a892
9 changed files with 34 additions and 66 deletions
|
@ -74,7 +74,7 @@ bool Power::is_power_needed() {
|
|||
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 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;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -544,7 +544,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
|||
case 120: M120(); break; // M120: Enable 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
|
||||
#endif
|
||||
|
||||
|
|
|
@ -602,7 +602,7 @@ private:
|
|||
static void M191();
|
||||
#endif
|
||||
|
||||
#if HOTENDS && HAS_LCD_MENU
|
||||
#if HAS_HOTEND && HAS_LCD_MENU
|
||||
static void M145();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HOTENDS && HAS_LCD_MENU
|
||||
#if HAS_HOTEND && HAS_LCD_MENU
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../lcd/ultralcd.h"
|
||||
|
|
|
@ -1653,7 +1653,7 @@
|
|||
#define HAS_TEMP_ADC_CHAMBER 1
|
||||
#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
|
||||
#endif
|
||||
#define HAS_TEMP_BED HAS_TEMP_ADC_BED
|
||||
|
|
|
@ -1749,7 +1749,7 @@
|
|||
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
|
||||
#define DO_DRAW_FAN 1
|
||||
#endif
|
||||
#if HOTENDS && ENABLED(STATUS_HOTEND_ANIM)
|
||||
#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM)
|
||||
#define ANIM_HOTEND 1
|
||||
#endif
|
||||
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
|
||||
|
|
|
@ -169,7 +169,7 @@ namespace ExtUI {
|
|||
}
|
||||
|
||||
void enableHeater(const extruder_t extruder) {
|
||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
||||
#if HAS_HOTEND && HEATER_IDLE_HANDLER
|
||||
thermalManager.reset_hotend_idle_timer(extruder - E0);
|
||||
#else
|
||||
UNUSED(extruder);
|
||||
|
@ -234,7 +234,7 @@ namespace ExtUI {
|
|||
|
||||
bool isHeaterIdle(const extruder_t extruder) {
|
||||
return false
|
||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
||||
#if HAS_HOTEND && HEATER_IDLE_HANDLER
|
||||
|| thermalManager.hotend_idle[extruder - E0].timed_out
|
||||
#else
|
||||
; UNUSED(extruder)
|
||||
|
@ -746,13 +746,13 @@ namespace ExtUI {
|
|||
#endif
|
||||
|
||||
float getZOffset_mm() {
|
||||
#if HAS_BED_PROBE
|
||||
return probe.offset.z;
|
||||
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||
return (planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]);
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
return (0.0f
|
||||
#if HAS_BED_PROBE
|
||||
+ probe.offset.z
|
||||
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||
+ planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
void setZOffset_mm(const float value) {
|
||||
|
@ -857,17 +857,9 @@ namespace ExtUI {
|
|||
float getFeedrate_percent() { return feedrate_percentage; }
|
||||
|
||||
#if ENABLED(PIDTEMP)
|
||||
float getPIDValues_Kp(const extruder_t 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_Kp(const extruder_t 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)); }
|
||||
|
||||
void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
||||
thermalManager.temp_hotend[tool].pid.Kp = p;
|
||||
|
@ -876,23 +868,15 @@ namespace ExtUI {
|
|||
thermalManager.updatePID();
|
||||
}
|
||||
|
||||
void startPIDTune(const float temp, extruder_t tool){
|
||||
void startPIDTune(const float temp, extruder_t tool) {
|
||||
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
float getBedPIDValues_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_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); }
|
||||
|
||||
void setBedPIDValues(const float p, const float i, const float d) {
|
||||
thermalManager.temp_bed.pid.Kp = p;
|
||||
|
@ -906,20 +890,12 @@ namespace ExtUI {
|
|||
}
|
||||
#endif
|
||||
|
||||
void injectCommands_P(PGM_P const gcode) {
|
||||
queue.inject_P(gcode);
|
||||
}
|
||||
void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
|
||||
|
||||
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
||||
|
||||
bool isAxisPositionKnown(const axis_t axis) {
|
||||
return TEST(axis_known_position, axis);
|
||||
}
|
||||
|
||||
bool isAxisPositionKnown(const extruder_t) {
|
||||
return TEST(axis_known_position, E_AXIS);
|
||||
}
|
||||
|
||||
bool isAxisPositionKnown(const axis_t axis) { return TEST(axis_known_position, axis); }
|
||||
bool isAxisPositionKnown(const extruder_t) { return TEST(axis_known_position, E_AXIS); }
|
||||
bool isPositionKnown() { return all_axes_known(); }
|
||||
bool isMachineHomed() { return all_axes_homed(); }
|
||||
|
||||
|
@ -1008,17 +984,9 @@ namespace ExtUI {
|
|||
return IFSD(IS_SD_INSERTED() && card.isMounted(), false);
|
||||
}
|
||||
|
||||
void pausePrint() {
|
||||
ui.pause_print();
|
||||
}
|
||||
|
||||
void resumePrint() {
|
||||
ui.resume_print();
|
||||
}
|
||||
|
||||
void stopPrint() {
|
||||
ui.abort_print();
|
||||
}
|
||||
void pausePrint() { ui.pause_print(); }
|
||||
void resumePrint() { ui.resume_print(); }
|
||||
void stopPrint() { ui.abort_print(); }
|
||||
|
||||
void onUserConfirmRequired_P(PGM_P const pstr) {
|
||||
char msg[strlen_P(pstr) + 1];
|
||||
|
|
|
@ -799,7 +799,7 @@ void MarlinSettings::postprocess() {
|
|||
{
|
||||
_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,
|
||||
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
||||
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);
|
||||
|
||||
#if HOTENDS && HAS_LCD_MENU
|
||||
#if HAS_HOTEND && HAS_LCD_MENU
|
||||
int16_t (&ui_preheat_hotend_temp)[2] = ui.preheat_hotend_temp,
|
||||
(&ui_preheat_bed_temp)[2] = ui.preheat_bed_temp;
|
||||
uint8_t (&ui_preheat_fan_speed)[2] = ui.preheat_fan_speed;
|
||||
|
@ -2557,7 +2557,7 @@ void MarlinSettings::reset() {
|
|||
// 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[1] = PREHEAT_2_TEMP_HOTEND;
|
||||
ui.preheat_bed_temp[0] = PREHEAT_1_TEMP_BED;
|
||||
|
@ -3077,7 +3077,7 @@ void MarlinSettings::reset() {
|
|||
|
||||
#endif // [XYZ]_DUAL_ENDSTOPS
|
||||
|
||||
#if HOTENDS && HAS_LCD_MENU
|
||||
#if HAS_HOTEND && HAS_LCD_MENU
|
||||
|
||||
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
||||
LOOP_L_N(i, COUNT(ui.preheat_hotend_temp)) {
|
||||
|
|
|
@ -2386,7 +2386,7 @@ void Temperature::tick() {
|
|||
|
||||
#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 =
|
||||
#if ENABLED(SOFT_PWM_DITHER)
|
||||
_BV(SOFT_PWM_SCALE) - 1
|
||||
|
@ -2931,7 +2931,7 @@ void Temperature::tick() {
|
|||
|
||||
#endif // AUTO_REPORT_TEMPERATURES
|
||||
|
||||
#if HOTENDS && HAS_DISPLAY
|
||||
#if HAS_HOTEND && HAS_DISPLAY
|
||||
void Temperature::set_heating_message(const uint8_t e) {
|
||||
const bool heating = isHeatingHotend(e);
|
||||
ui.status_printf_P(0,
|
||||
|
|
Reference in a new issue