🩹 Fix Fan Tail Speed Init (#24076)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Mike La Spina 2022-05-09 17:18:47 -05:00 committed by Scott Lahteine
parent a7e4061d12
commit 238ab1dd06
2 changed files with 13 additions and 13 deletions

View File

@ -1306,7 +1306,7 @@ void Planner::check_axes_activity() {
#if HAS_FAN && DISABLED(LASER_SYNCHRONOUS_M106_M107)
#define HAS_TAIL_FAN_SPEED 1
static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 128);
static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 13);
bool fans_need_update = false;
#endif
@ -1342,15 +1342,15 @@ void Planner::check_axes_activity() {
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_E)
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
block_t *block = &block_buffer[b];
block_t * const bnext = &block_buffer[b];
LOGICAL_AXIS_CODE(
if (TERN0(DISABLE_E, block->steps.e)) axis_active.e = true,
if (TERN0(DISABLE_X, block->steps.x)) axis_active.x = true,
if (TERN0(DISABLE_Y, block->steps.y)) axis_active.y = true,
if (TERN0(DISABLE_Z, block->steps.z)) axis_active.z = true,
if (TERN0(DISABLE_I, block->steps.i)) axis_active.i = true,
if (TERN0(DISABLE_J, block->steps.j)) axis_active.j = true,
if (TERN0(DISABLE_K, block->steps.k)) axis_active.k = true
if (TERN0(DISABLE_E, bnext->steps.e)) axis_active.e = true,
if (TERN0(DISABLE_X, bnext->steps.x)) axis_active.x = true,
if (TERN0(DISABLE_Y, bnext->steps.y)) axis_active.y = true,
if (TERN0(DISABLE_Z, bnext->steps.z)) axis_active.z = true,
if (TERN0(DISABLE_I, bnext->steps.i)) axis_active.i = true,
if (TERN0(DISABLE_J, bnext->steps.j)) axis_active.j = true,
if (TERN0(DISABLE_K, bnext->steps.k)) axis_active.k = true
);
}
#endif
@ -1445,14 +1445,14 @@ void Planner::check_axes_activity() {
* currently in the planner.
*/
void Planner::autotemp_task() {
static float oldt = 0;
static float oldt = 0.0f;
if (!autotemp_enabled) return;
if (thermalManager.degTargetHotend(active_extruder) < autotemp_min - 2) return; // Below the min?
float high = 0.0;
float high = 0.0f;
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
block_t *block = &block_buffer[b];
const block_t * const block = &block_buffer[b];
if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, || block->steps.i, || block->steps.j, || block->steps.k)) {
const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
NOLESS(high, se);

View File

@ -1020,7 +1020,7 @@ class Planner {
return limit_value;
}
#endif // !CLASSIC_JERK
#endif // HAS_JUNCTION_DEVIATION
};
#define PLANNER_XY_FEEDRATE() _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS])