🧑💻 Remove extraneous 'inline' hints
This commit is contained in:
committed by
Scott Lahteine
parent
ccc66a8528
commit
5b9f3bd4b1
@@ -136,7 +136,7 @@ class Endstops {
|
||||
return enabled || TERN0(HAS_BED_PROBE, z_probe_enabled);
|
||||
}
|
||||
|
||||
static inline bool global_enabled() { return enabled_globally; }
|
||||
static bool global_enabled() { return enabled_globally; }
|
||||
|
||||
/**
|
||||
* Periodic call to poll endstops if required. Called from temperature ISR
|
||||
@@ -168,7 +168,7 @@ class Endstops {
|
||||
;
|
||||
}
|
||||
|
||||
static inline bool probe_switch_activated() {
|
||||
static bool probe_switch_activated() {
|
||||
return (true
|
||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||
&& READ(PROBE_ACTIVATION_SWITCH_PIN) == PROBE_ACTIVATION_SWITCH_STATE
|
||||
|
@@ -431,15 +431,15 @@ class Planner {
|
||||
static int8_t xy_freq_limit_hz; // Minimum XY frequency setting
|
||||
static float xy_freq_min_speed_factor; // Minimum speed factor setting
|
||||
static int32_t xy_freq_min_interval_us; // Minimum segment time based on xy_freq_limit_hz
|
||||
static inline void refresh_frequency_limit() {
|
||||
static void refresh_frequency_limit() {
|
||||
//xy_freq_min_interval_us = xy_freq_limit_hz ?: LROUND(1000000.0f / xy_freq_limit_hz);
|
||||
if (xy_freq_limit_hz)
|
||||
xy_freq_min_interval_us = LROUND(1000000.0f / xy_freq_limit_hz);
|
||||
}
|
||||
static inline void set_min_speed_factor_u8(const uint8_t v255) {
|
||||
static void set_min_speed_factor_u8(const uint8_t v255) {
|
||||
xy_freq_min_speed_factor = float(ui8_to_percent(v255)) / 100;
|
||||
}
|
||||
static inline void set_frequency_limit(const uint8_t hz) {
|
||||
static void set_frequency_limit(const uint8_t hz) {
|
||||
xy_freq_limit_hz = constrain(hz, 0, 100);
|
||||
refresh_frequency_limit();
|
||||
}
|
||||
@@ -508,7 +508,7 @@ class Planner {
|
||||
#if HAS_CLASSIC_JERK
|
||||
static void set_max_jerk(const AxisEnum axis, float inMaxJerkMMS);
|
||||
#else
|
||||
static inline void set_max_jerk(const AxisEnum, const_float_t) {}
|
||||
static void set_max_jerk(const AxisEnum, const_float_t) {}
|
||||
#endif
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
@@ -516,7 +516,7 @@ class Planner {
|
||||
e_factor[e] = flow_percentage[e] * 0.01f * TERN(NO_VOLUMETRICS, 1.0f, volumetric_multiplier[e]);
|
||||
}
|
||||
|
||||
static inline void set_flow(const uint8_t e, const int16_t flow) {
|
||||
static void set_flow(const uint8_t e, const int16_t flow) {
|
||||
flow_percentage[e] = flow;
|
||||
refresh_e_factor(e);
|
||||
}
|
||||
@@ -539,7 +539,7 @@ class Planner {
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
void apply_filament_width_sensor(const int8_t encoded_ratio);
|
||||
|
||||
static inline float volumetric_percent(const bool vol) {
|
||||
static float volumetric_percent(const bool vol) {
|
||||
return 100.0f * (vol
|
||||
? volumetric_area_nominal / volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
|
||||
: volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
|
||||
@@ -588,7 +588,7 @@ class Planner {
|
||||
* Returns 1.0 if planner.z_fade_height is 0.0.
|
||||
* Returns 0.0 if Z is past the specified 'Fade Height'.
|
||||
*/
|
||||
static inline float fade_scaling_factor_for_z(const_float_t rz) {
|
||||
static float fade_scaling_factor_for_z(const_float_t rz) {
|
||||
static float z_fade_factor = 1;
|
||||
if (!z_fade_height) return 1;
|
||||
if (rz >= z_fade_height) return 0;
|
||||
@@ -838,7 +838,7 @@ class Planner {
|
||||
*/
|
||||
static float get_axis_position_mm(const AxisEnum axis);
|
||||
|
||||
static inline abce_pos_t get_axis_positions_mm() {
|
||||
static abce_pos_t get_axis_positions_mm() {
|
||||
const abce_pos_t out = LOGICAL_AXIS_ARRAY(
|
||||
get_axis_position_mm(E_AXIS),
|
||||
get_axis_position_mm(A_AXIS), get_axis_position_mm(B_AXIS), get_axis_position_mm(C_AXIS),
|
||||
@@ -870,7 +870,7 @@ class Planner {
|
||||
static float triggered_position_mm(const AxisEnum axis);
|
||||
|
||||
// Blocks are queued, or we're running out moves, or the closed loop controller is waiting
|
||||
static inline bool busy() {
|
||||
static bool busy() {
|
||||
return (has_blocks_queued() || cleaning_buffer_counter
|
||||
|| TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING())
|
||||
);
|
||||
@@ -938,7 +938,7 @@ class Planner {
|
||||
#if ENABLED(AUTOTEMP_PROPORTIONAL)
|
||||
static void _autotemp_update_from_hotend();
|
||||
#else
|
||||
static inline void _autotemp_update_from_hotend() {}
|
||||
static void _autotemp_update_from_hotend() {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -112,7 +112,7 @@ class PrintCounter: public Stopwatch {
|
||||
/**
|
||||
* @brief Initialize the print counter
|
||||
*/
|
||||
static inline void init() {
|
||||
static void init() {
|
||||
super::init();
|
||||
loadStats();
|
||||
}
|
||||
@@ -176,8 +176,8 @@ class PrintCounter: public Stopwatch {
|
||||
*/
|
||||
static bool start();
|
||||
static bool _stop(const bool completed);
|
||||
static inline bool stop() { return _stop(true); }
|
||||
static inline bool abort() { return _stop(false); }
|
||||
static bool stop() { return _stop(true); }
|
||||
static bool abort() { return _stop(false); }
|
||||
|
||||
static void reset();
|
||||
|
||||
|
@@ -59,7 +59,7 @@ class MarlinSettings {
|
||||
static bool load(); // Return 'true' if data was loaded ok
|
||||
static bool validate(); // Return 'true' if EEPROM data is ok
|
||||
|
||||
static inline void first_load() {
|
||||
static void first_load() {
|
||||
static bool loaded = false;
|
||||
if (!loaded && load()) loaded = true;
|
||||
}
|
||||
|
@@ -457,11 +457,11 @@ class Stepper {
|
||||
|
||||
// The stepper subsystem goes to sleep when it runs out of things to execute.
|
||||
// Call this to notify the subsystem that it is time to go to work.
|
||||
static inline void wake_up() { ENABLE_STEPPER_DRIVER_INTERRUPT(); }
|
||||
static void wake_up() { ENABLE_STEPPER_DRIVER_INTERRUPT(); }
|
||||
|
||||
static inline bool is_awake() { return STEPPER_ISR_ENABLED(); }
|
||||
static bool is_awake() { return STEPPER_ISR_ENABLED(); }
|
||||
|
||||
static inline bool suspend() {
|
||||
static bool suspend() {
|
||||
const bool awake = is_awake();
|
||||
if (awake) DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
return awake;
|
||||
@@ -564,7 +564,7 @@ class Stepper {
|
||||
FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
|
||||
#endif
|
||||
#endif
|
||||
static inline void set_all_z_lock(const bool lock, const int8_t except=-1) {
|
||||
static void set_all_z_lock(const bool lock, const int8_t except=-1) {
|
||||
set_z1_lock(lock ^ (except == 0));
|
||||
set_z2_lock(lock ^ (except == 1));
|
||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
||||
@@ -586,16 +586,16 @@ class Stepper {
|
||||
|
||||
static axis_flags_t axis_enabled; // Axis stepper(s) ENABLED states
|
||||
|
||||
static inline bool axis_is_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
static bool axis_is_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
return TEST(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex));
|
||||
}
|
||||
static inline void mark_axis_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
static void mark_axis_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
SBI(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex));
|
||||
}
|
||||
static inline void mark_axis_disabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
static void mark_axis_disabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
CBI(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex));
|
||||
}
|
||||
static inline bool can_axis_disable(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
static bool can_axis_disable(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) {
|
||||
return !any_enable_overlap() || !(axis_enabled.bits & enable_overlap[INDEX_OF_AXIS(axis, eindex)]);
|
||||
}
|
||||
|
||||
@@ -608,10 +608,10 @@ class Stepper {
|
||||
static void enable_e_steppers();
|
||||
static void disable_e_steppers();
|
||||
#else
|
||||
static inline void enable_extruder() {}
|
||||
static inline bool disable_extruder() { return true; }
|
||||
static inline void enable_e_steppers() {}
|
||||
static inline void disable_e_steppers() {}
|
||||
static void enable_extruder() {}
|
||||
static bool disable_extruder() { return true; }
|
||||
static void enable_e_steppers() {}
|
||||
static void disable_e_steppers() {}
|
||||
#endif
|
||||
|
||||
#define ENABLE_EXTRUDER(N) enable_extruder(E_TERN_(N))
|
||||
|
@@ -359,7 +359,7 @@ class Temperature {
|
||||
#if HAS_HOTEND
|
||||
static hotend_info_t temp_hotend[HOTENDS];
|
||||
static const celsius_t hotend_maxtemp[HOTENDS];
|
||||
static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); }
|
||||
static celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); }
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
static bed_info_t temp_bed;
|
||||
@@ -402,16 +402,16 @@ class Temperature {
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
static bool allow_cold_extrude;
|
||||
static celsius_t extrude_min_temp;
|
||||
static inline bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); }
|
||||
static inline bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); }
|
||||
static inline bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); }
|
||||
static bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); }
|
||||
static bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); }
|
||||
static bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); }
|
||||
#else
|
||||
static inline bool tooColdToExtrude(const uint8_t) { return false; }
|
||||
static inline bool targetTooColdToExtrude(const uint8_t) { return false; }
|
||||
static bool tooColdToExtrude(const uint8_t) { return false; }
|
||||
static bool targetTooColdToExtrude(const uint8_t) { return false; }
|
||||
#endif
|
||||
|
||||
static inline bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
|
||||
static inline bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
|
||||
static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
|
||||
static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
|
||||
|
||||
#if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN)
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
@@ -449,7 +449,7 @@ class Temperature {
|
||||
};
|
||||
|
||||
// Convert the given heater_id_t to idle array index
|
||||
static inline IdleIndex idle_index_for_id(const int8_t heater_id) {
|
||||
static IdleIndex idle_index_for_id(const int8_t heater_id) {
|
||||
TERN_(HAS_HEATED_BED, if (heater_id == H_BED) return IDLE_INDEX_BED);
|
||||
return (IdleIndex)_MAX(heater_id, 0);
|
||||
}
|
||||
@@ -525,7 +525,7 @@ class Temperature {
|
||||
#if HAS_FAN_LOGIC
|
||||
static millis_t fan_update_ms;
|
||||
|
||||
static inline void manage_extruder_fans(millis_t ms) {
|
||||
static void manage_extruder_fans(millis_t ms) {
|
||||
if (ELAPSED(ms, fan_update_ms)) { // only need to check fan state very infrequently
|
||||
const millis_t next_ms = ms + fan_update_interval_ms;
|
||||
#if HAS_PWMFANCHECK
|
||||
@@ -566,25 +566,25 @@ class Temperature {
|
||||
static void M305_report(const uint8_t t_index, const bool forReplay=true);
|
||||
static void reset_user_thermistors();
|
||||
static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw);
|
||||
static inline bool set_pull_up_res(int8_t t_index, float value) {
|
||||
static bool set_pull_up_res(int8_t t_index, float value) {
|
||||
//if (!WITHIN(t_index, 0, USER_THERMISTORS - 1)) return false;
|
||||
if (!WITHIN(value, 1, 1000000)) return false;
|
||||
user_thermistor[t_index].series_res = value;
|
||||
return true;
|
||||
}
|
||||
static inline bool set_res25(int8_t t_index, float value) {
|
||||
static bool set_res25(int8_t t_index, float value) {
|
||||
if (!WITHIN(value, 1, 10000000)) return false;
|
||||
user_thermistor[t_index].res_25 = value;
|
||||
user_thermistor[t_index].pre_calc = true;
|
||||
return true;
|
||||
}
|
||||
static inline bool set_beta(int8_t t_index, float value) {
|
||||
static bool set_beta(int8_t t_index, float value) {
|
||||
if (!WITHIN(value, 1, 1000000)) return false;
|
||||
user_thermistor[t_index].beta = value;
|
||||
user_thermistor[t_index].pre_calc = true;
|
||||
return true;
|
||||
}
|
||||
static inline bool set_sh_coeff(int8_t t_index, float value) {
|
||||
static bool set_sh_coeff(int8_t t_index, float value) {
|
||||
if (!WITHIN(value, -0.01f, 0.01f)) return false;
|
||||
user_thermistor[t_index].sh_c_coeff = value;
|
||||
user_thermistor[t_index].pre_calc = true;
|
||||
@@ -634,18 +634,18 @@ class Temperature {
|
||||
static uint8_t fan_speed_scaler[FAN_COUNT];
|
||||
#endif
|
||||
|
||||
static inline uint8_t scaledFanSpeed(const uint8_t fan, const uint8_t fs) {
|
||||
static uint8_t scaledFanSpeed(const uint8_t fan, const uint8_t fs) {
|
||||
UNUSED(fan); // Potentially unused!
|
||||
return (fs * uint16_t(TERN(ADAPTIVE_FAN_SLOWING, fan_speed_scaler[fan], 128))) >> 7;
|
||||
}
|
||||
|
||||
static inline uint8_t scaledFanSpeed(const uint8_t fan) {
|
||||
static uint8_t scaledFanSpeed(const uint8_t fan) {
|
||||
return scaledFanSpeed(fan, fan_speed[fan]);
|
||||
}
|
||||
|
||||
static constexpr inline uint8_t pwmToPercent(const uint8_t speed) { return ui8_to_percent(speed); }
|
||||
static inline uint8_t fanSpeedPercent(const uint8_t fan) { return ui8_to_percent(fan_speed[fan]); }
|
||||
static inline uint8_t scaledFanSpeedPercent(const uint8_t fan) { return ui8_to_percent(scaledFanSpeed(fan)); }
|
||||
static uint8_t fanSpeedPercent(const uint8_t fan) { return ui8_to_percent(fan_speed[fan]); }
|
||||
static uint8_t scaledFanSpeedPercent(const uint8_t fan) { return ui8_to_percent(scaledFanSpeed(fan)); }
|
||||
|
||||
#if ENABLED(EXTRA_FAN_SPEED)
|
||||
typedef struct { uint8_t saved, speed; } extra_fan_t;
|
||||
@@ -659,7 +659,7 @@ class Temperature {
|
||||
|
||||
#endif // HAS_FAN
|
||||
|
||||
static inline void zero_fan_speeds() {
|
||||
static void zero_fan_speeds() {
|
||||
#if HAS_FAN
|
||||
FANS_LOOP(i) set_fan_speed(i, 0);
|
||||
#endif
|
||||
@@ -680,13 +680,13 @@ class Temperature {
|
||||
* Preheating hotends
|
||||
*/
|
||||
#if MILLISECONDS_PREHEAT_TIME > 0
|
||||
static inline bool is_preheating(const uint8_t E_NAME) {
|
||||
static bool is_preheating(const uint8_t E_NAME) {
|
||||
return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
|
||||
}
|
||||
static inline void start_preheat_time(const uint8_t E_NAME) {
|
||||
static void start_preheat_time(const uint8_t E_NAME) {
|
||||
preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
|
||||
}
|
||||
static inline void reset_preheat_time(const uint8_t E_NAME) {
|
||||
static void reset_preheat_time(const uint8_t E_NAME) {
|
||||
preheat_end_time[HOTEND_INDEX] = 0;
|
||||
}
|
||||
#else
|
||||
@@ -697,21 +697,21 @@ class Temperature {
|
||||
//inline so that there is no performance decrease.
|
||||
//deg=degreeCelsius
|
||||
|
||||
static inline celsius_float_t degHotend(const uint8_t E_NAME) {
|
||||
static celsius_float_t degHotend(const uint8_t E_NAME) {
|
||||
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].celsius);
|
||||
}
|
||||
|
||||
static inline celsius_t wholeDegHotend(const uint8_t E_NAME) {
|
||||
static celsius_t wholeDegHotend(const uint8_t E_NAME) {
|
||||
return TERN0(HAS_HOTEND, static_cast<celsius_t>(temp_hotend[HOTEND_INDEX].celsius + 0.5f));
|
||||
}
|
||||
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawHotendTemp(const uint8_t E_NAME) {
|
||||
static int16_t rawHotendTemp(const uint8_t E_NAME) {
|
||||
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].raw);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline celsius_t degTargetHotend(const uint8_t E_NAME) {
|
||||
static celsius_t degTargetHotend(const uint8_t E_NAME) {
|
||||
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].target);
|
||||
}
|
||||
|
||||
@@ -730,11 +730,11 @@ class Temperature {
|
||||
start_watching_hotend(ee);
|
||||
}
|
||||
|
||||
static inline bool isHeatingHotend(const uint8_t E_NAME) {
|
||||
static bool isHeatingHotend(const uint8_t E_NAME) {
|
||||
return temp_hotend[HOTEND_INDEX].target > temp_hotend[HOTEND_INDEX].celsius;
|
||||
}
|
||||
|
||||
static inline bool isCoolingHotend(const uint8_t E_NAME) {
|
||||
static bool isCoolingHotend(const uint8_t E_NAME) {
|
||||
return temp_hotend[HOTEND_INDEX].target < temp_hotend[HOTEND_INDEX].celsius;
|
||||
}
|
||||
|
||||
@@ -748,16 +748,16 @@ class Temperature {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static inline bool still_heating(const uint8_t e) {
|
||||
static bool still_heating(const uint8_t e) {
|
||||
return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(wholeDegHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
|
||||
}
|
||||
|
||||
static inline bool degHotendNear(const uint8_t e, const celsius_t temp) {
|
||||
static bool degHotendNear(const uint8_t e, const celsius_t temp) {
|
||||
return ABS(wholeDegHotend(e) - temp) < (TEMP_HYSTERESIS);
|
||||
}
|
||||
|
||||
// Start watching a Hotend to make sure it's really heating up
|
||||
static inline void start_watching_hotend(const uint8_t E_NAME) {
|
||||
static void start_watching_hotend(const uint8_t E_NAME) {
|
||||
UNUSED(HOTEND_INDEX);
|
||||
#if WATCH_HOTENDS
|
||||
watch_hotend[HOTEND_INDEX].restart(degHotend(HOTEND_INDEX), degTargetHotend(HOTEND_INDEX));
|
||||
@@ -769,16 +769,16 @@ class Temperature {
|
||||
#if HAS_HEATED_BED
|
||||
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawBedTemp() { return temp_bed.raw; }
|
||||
static int16_t rawBedTemp() { return temp_bed.raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degBed() { return temp_bed.celsius; }
|
||||
static inline celsius_t wholeDegBed() { return static_cast<celsius_t>(degBed() + 0.5f); }
|
||||
static inline celsius_t degTargetBed() { return temp_bed.target; }
|
||||
static inline bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; }
|
||||
static inline bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; }
|
||||
static celsius_float_t degBed() { return temp_bed.celsius; }
|
||||
static celsius_t wholeDegBed() { return static_cast<celsius_t>(degBed() + 0.5f); }
|
||||
static celsius_t degTargetBed() { return temp_bed.target; }
|
||||
static bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; }
|
||||
static bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; }
|
||||
|
||||
// Start watching the Bed to make sure it's really heating up
|
||||
static inline void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); }
|
||||
static void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); }
|
||||
|
||||
static void setTargetBed(const celsius_t celsius) {
|
||||
TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on());
|
||||
@@ -792,7 +792,7 @@ class Temperature {
|
||||
|
||||
static void wait_for_bed_heating();
|
||||
|
||||
static inline bool degBedNear(const celsius_t temp) {
|
||||
static bool degBedNear(const celsius_t temp) {
|
||||
return ABS(wholeDegBed() - temp) < (TEMP_BED_HYSTERESIS);
|
||||
}
|
||||
|
||||
@@ -800,25 +800,25 @@ class Temperature {
|
||||
|
||||
#if HAS_TEMP_PROBE
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawProbeTemp() { return temp_probe.raw; }
|
||||
static int16_t rawProbeTemp() { return temp_probe.raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degProbe() { return temp_probe.celsius; }
|
||||
static inline celsius_t wholeDegProbe() { return static_cast<celsius_t>(degProbe() + 0.5f); }
|
||||
static inline bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; }
|
||||
static inline bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; }
|
||||
static celsius_float_t degProbe() { return temp_probe.celsius; }
|
||||
static celsius_t wholeDegProbe() { return static_cast<celsius_t>(degProbe() + 0.5f); }
|
||||
static bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; }
|
||||
static bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; }
|
||||
static bool wait_for_probe(const celsius_t target_temp, bool no_wait_for_cooling=true);
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_CHAMBER
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawChamberTemp() { return temp_chamber.raw; }
|
||||
static int16_t rawChamberTemp() { return temp_chamber.raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degChamber() { return temp_chamber.celsius; }
|
||||
static inline celsius_t wholeDegChamber() { return static_cast<celsius_t>(degChamber() + 0.5f); }
|
||||
static celsius_float_t degChamber() { return temp_chamber.celsius; }
|
||||
static celsius_t wholeDegChamber() { return static_cast<celsius_t>(degChamber() + 0.5f); }
|
||||
#if HAS_HEATED_CHAMBER
|
||||
static inline celsius_t degTargetChamber() { return temp_chamber.target; }
|
||||
static inline bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; }
|
||||
static inline bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; }
|
||||
static celsius_t degTargetChamber() { return temp_chamber.target; }
|
||||
static bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; }
|
||||
static bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; }
|
||||
static bool wait_for_chamber(const bool no_wait_for_cooling=true);
|
||||
#endif
|
||||
#endif
|
||||
@@ -829,49 +829,49 @@ class Temperature {
|
||||
start_watching_chamber();
|
||||
}
|
||||
// Start watching the Chamber to make sure it's really heating up
|
||||
static inline void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); }
|
||||
static void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); }
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_COOLER
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawCoolerTemp() { return temp_cooler.raw; }
|
||||
static int16_t rawCoolerTemp() { return temp_cooler.raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degCooler() { return temp_cooler.celsius; }
|
||||
static inline celsius_t wholeDegCooler() { return static_cast<celsius_t>(temp_cooler.celsius + 0.5f); }
|
||||
static celsius_float_t degCooler() { return temp_cooler.celsius; }
|
||||
static celsius_t wholeDegCooler() { return static_cast<celsius_t>(temp_cooler.celsius + 0.5f); }
|
||||
#if HAS_COOLER
|
||||
static inline celsius_t degTargetCooler() { return temp_cooler.target; }
|
||||
static inline bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; }
|
||||
static inline bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; }
|
||||
static celsius_t degTargetCooler() { return temp_cooler.target; }
|
||||
static bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; }
|
||||
static bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; }
|
||||
static bool wait_for_cooler(const bool no_wait_for_cooling=true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_BOARD
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawBoardTemp() { return temp_board.raw; }
|
||||
static int16_t rawBoardTemp() { return temp_board.raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degBoard() { return temp_board.celsius; }
|
||||
static inline celsius_t wholeDegBoard() { return static_cast<celsius_t>(temp_board.celsius + 0.5f); }
|
||||
static celsius_float_t degBoard() { return temp_board.celsius; }
|
||||
static celsius_t wholeDegBoard() { return static_cast<celsius_t>(temp_board.celsius + 0.5f); }
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_REDUNDANT
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
static inline int16_t rawRedundantTemp() { return temp_redundant.raw; }
|
||||
static inline int16_t rawRedundanTargetTemp() { return (*temp_redundant.target).raw; }
|
||||
static int16_t rawRedundantTemp() { return temp_redundant.raw; }
|
||||
static int16_t rawRedundanTargetTemp() { return (*temp_redundant.target).raw; }
|
||||
#endif
|
||||
static inline celsius_float_t degRedundant() { return temp_redundant.celsius; }
|
||||
static inline celsius_float_t degRedundantTarget() { return (*temp_redundant.target).celsius; }
|
||||
static inline celsius_t wholeDegRedundant() { return static_cast<celsius_t>(temp_redundant.celsius + 0.5f); }
|
||||
static inline celsius_t wholeDegRedundantTarget() { return static_cast<celsius_t>((*temp_redundant.target).celsius + 0.5f); }
|
||||
static celsius_float_t degRedundant() { return temp_redundant.celsius; }
|
||||
static celsius_float_t degRedundantTarget() { return (*temp_redundant.target).celsius; }
|
||||
static celsius_t wholeDegRedundant() { return static_cast<celsius_t>(temp_redundant.celsius + 0.5f); }
|
||||
static celsius_t wholeDegRedundantTarget() { return static_cast<celsius_t>((*temp_redundant.target).celsius + 0.5f); }
|
||||
#endif
|
||||
|
||||
#if HAS_COOLER
|
||||
static inline void setTargetCooler(const celsius_t celsius) {
|
||||
static void setTargetCooler(const celsius_t celsius) {
|
||||
temp_cooler.target = constrain(celsius, COOLER_MIN_TARGET, COOLER_MAX_TARGET);
|
||||
start_watching_cooler();
|
||||
}
|
||||
// Start watching the Cooler to make sure it's really cooling down
|
||||
static inline void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); }
|
||||
static void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -887,7 +887,7 @@ class Temperature {
|
||||
/**
|
||||
* Cooldown, as from the LCD. Disables all heaters and fans.
|
||||
*/
|
||||
static inline void cooldown() {
|
||||
static void cooldown() {
|
||||
zero_fan_speeds();
|
||||
disable_all_heaters();
|
||||
}
|
||||
@@ -921,7 +921,7 @@ class Temperature {
|
||||
* Update the temp manager when PID values change
|
||||
*/
|
||||
#if ENABLED(PIDTEMP)
|
||||
static inline void updatePID() {
|
||||
static void updatePID() {
|
||||
TERN_(PID_EXTRUSION_SCALING, last_e_position = 0);
|
||||
}
|
||||
#endif
|
||||
@@ -934,13 +934,13 @@ class Temperature {
|
||||
|
||||
#if HEATER_IDLE_HANDLER
|
||||
|
||||
static inline void reset_hotend_idle_timer(const uint8_t E_NAME) {
|
||||
static void reset_hotend_idle_timer(const uint8_t E_NAME) {
|
||||
heater_idle[HOTEND_INDEX].reset();
|
||||
start_watching_hotend(HOTEND_INDEX);
|
||||
}
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
static inline void reset_bed_idle_timer() {
|
||||
static void reset_bed_idle_timer() {
|
||||
heater_idle[IDLE_INDEX_BED].reset();
|
||||
start_watching_bed();
|
||||
}
|
||||
@@ -961,7 +961,7 @@ class Temperature {
|
||||
#if HAS_HOTEND && HAS_STATUS_MESSAGE
|
||||
static void set_heating_message(const uint8_t e);
|
||||
#else
|
||||
static inline void set_heating_message(const uint8_t) {}
|
||||
static void set_heating_message(const uint8_t) {}
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU && HAS_TEMPERATURE
|
||||
@@ -974,7 +974,7 @@ class Temperature {
|
||||
static volatile bool raw_temps_ready;
|
||||
static void update_raw_temperatures();
|
||||
static void updateTemperaturesFromRawValues();
|
||||
static inline bool updateTemperaturesIfReady() {
|
||||
static bool updateTemperaturesIfReady() {
|
||||
if (!raw_temps_ready) return false;
|
||||
updateTemperaturesFromRawValues();
|
||||
raw_temps_ready = false;
|
||||
@@ -1028,7 +1028,7 @@ class Temperature {
|
||||
};
|
||||
|
||||
// Convert the given heater_id_t to runaway state array index
|
||||
static inline RunawayIndex runaway_index_for_id(const int8_t heater_id) {
|
||||
static RunawayIndex runaway_index_for_id(const int8_t heater_id) {
|
||||
TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER);
|
||||
TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER);
|
||||
TERN_(HAS_THERMALLY_PROTECTED_BED, if (heater_id == H_BED) return RUNAWAY_IND_BED);
|
||||
|
Reference in New Issue
Block a user