Add HAS_FAN and others
This commit is contained in:
@ -1264,7 +1264,7 @@ void Planner::check_axes_activity() {
|
||||
xyze_bool_t axis_active = { false };
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
uint8_t tail_fan_speed[FAN_COUNT];
|
||||
#endif
|
||||
|
||||
@ -1279,11 +1279,11 @@ void Planner::check_axes_activity() {
|
||||
|
||||
if (has_blocks_queued()) {
|
||||
|
||||
#if FAN_COUNT > 0 || ENABLED(BARICUDA)
|
||||
#if HAS_FAN || ENABLED(BARICUDA)
|
||||
block_t *block = &block_buffer[block_buffer_tail];
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
FANS_LOOP(i)
|
||||
tail_fan_speed[i] = thermalManager.scaledFanSpeed(i, block->fan_speed[i]);
|
||||
#endif
|
||||
@ -1304,7 +1304,7 @@ void Planner::check_axes_activity() {
|
||||
|
||||
TERN_(HAS_CUTTER, cutter.refresh());
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
FANS_LOOP(i)
|
||||
tail_fan_speed[i] = thermalManager.scaledFanSpeed(i);
|
||||
#endif
|
||||
@ -1326,7 +1326,7 @@ void Planner::check_axes_activity() {
|
||||
//
|
||||
// Update Fan speeds
|
||||
//
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
|
||||
#if FAN_KICKSTART_TIME > 0
|
||||
static millis_t fan_kick_end[FAN_COUNT] = { 0 };
|
||||
@ -1366,7 +1366,7 @@ void Planner::check_axes_activity() {
|
||||
TERN_(HAS_FAN5, FAN_SET(5));
|
||||
TERN_(HAS_FAN6, FAN_SET(6));
|
||||
TERN_(HAS_FAN7, FAN_SET(7));
|
||||
#endif // FAN_COUNT > 0
|
||||
#endif // HAS_FAN
|
||||
|
||||
TERN_(AUTOTEMP, getHighESpeed());
|
||||
|
||||
@ -1906,7 +1906,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
TERN_(HAS_CUTTER, block->cutter_power = cutter.power);
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i];
|
||||
#endif
|
||||
|
||||
|
@ -175,7 +175,7 @@ typedef struct block_t {
|
||||
cutter_power_t cutter_power; // Power level for Spindle, Laser, etc.
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
uint8_t fan_speed[FAN_COUNT];
|
||||
#endif
|
||||
|
||||
|
@ -152,7 +152,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
|
||||
uint8_t Temperature::chamberfan_speed; // = 0
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
|
||||
uint8_t Temperature::fan_speed[FAN_COUNT]; // = { 0 }
|
||||
|
||||
@ -219,7 +219,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
|
||||
|
||||
#endif
|
||||
|
||||
#endif // FAN_COUNT > 0
|
||||
#endif // HAS_FAN
|
||||
|
||||
#if WATCH_HOTENDS
|
||||
hotend_watch_t Temperature::watch_hotend[HOTENDS]; // = { { 0 } }
|
||||
@ -400,7 +400,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL);
|
||||
|
||||
if (target > GHV(BED_MAXTEMP - 10, temp_range[heater].maxtemp - 15)) {
|
||||
if (target > GHV(BED_MAX_TARGET, temp_range[heater].maxtemp - 15)) {
|
||||
SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
|
||||
return;
|
||||
|
@ -477,7 +477,7 @@ class Temperature {
|
||||
static float analog_to_celsius_chamber(const int raw);
|
||||
#endif
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
|
||||
static uint8_t fan_speed[FAN_COUNT];
|
||||
#define FANS_LOOP(I) LOOP_L_N(I, FAN_COUNT)
|
||||
@ -517,10 +517,10 @@ class Temperature {
|
||||
void set_fans_paused(const bool p);
|
||||
#endif
|
||||
|
||||
#endif // FAN_COUNT > 0
|
||||
#endif // HAS_FAN
|
||||
|
||||
static inline void zero_fan_speeds() {
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
FANS_LOOP(i) set_fan_speed(i, 0);
|
||||
#endif
|
||||
}
|
||||
@ -634,7 +634,7 @@ class Temperature {
|
||||
TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
|
||||
temp_bed.target =
|
||||
#ifdef BED_MAXTEMP
|
||||
_MIN(celsius, BED_MAXTEMP - 10)
|
||||
_MIN(celsius, BED_MAX_TARGET)
|
||||
#else
|
||||
celsius
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
uint16_t singlenozzle_temp[EXTRUDERS];
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
uint8_t singlenozzle_fan_speed[EXTRUDERS];
|
||||
#endif
|
||||
#endif
|
||||
@ -819,7 +819,7 @@ void tool_change_prime() {
|
||||
#endif
|
||||
|
||||
// Cool down with fan
|
||||
#if TOOLCHANGE_FS_FAN >= 0 && FAN_COUNT > 0
|
||||
#if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
|
||||
const int16_t fansp = thermalManager.fan_speed[TOOLCHANGE_FS_FAN];
|
||||
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = toolchange_settings.fan_speed;
|
||||
safe_delay(toolchange_settings.fan_time * 1000);
|
||||
@ -1060,7 +1060,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
if (should_move) {
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
singlenozzle_fan_speed[old_tool] = thermalManager.fan_speed[0];
|
||||
thermalManager.fan_speed[0] = singlenozzle_fan_speed[new_tool];
|
||||
#endif
|
||||
@ -1098,7 +1098,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
#endif
|
||||
|
||||
// Cool down with fan
|
||||
#if TOOLCHANGE_FS_FAN >= 0 && FAN_COUNT > 0
|
||||
#if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
|
||||
const int16_t fansp = thermalManager.fan_speed[TOOLCHANGE_FS_FAN];
|
||||
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = toolchange_settings.fan_speed;
|
||||
safe_delay(toolchange_settings.fan_time * 1000);
|
||||
|
@ -110,7 +110,7 @@
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
extern uint16_t singlenozzle_temp[EXTRUDERS];
|
||||
#if FAN_COUNT > 0
|
||||
#if HAS_FAN
|
||||
extern uint8_t singlenozzle_fan_speed[EXTRUDERS];
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user