Skip to content

Commit

Permalink
🩹 Fix Fan Tail Speed Init (MarlinFirmware#24076)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
2 people authored and Jeremy Fairbanks committed Jul 18, 2022
1 parent eddd752 commit 659097e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 659097e

Please sign in to comment.