1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 15:26:18 +00:00

🩹 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 GitHub
parent 4a17589496
commit 726a38712e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 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,18 +1342,18 @@ 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_U, block->steps.u)) axis_active.u = true,
if (TERN0(DISABLE_V, block->steps.v)) axis_active.v = true,
if (TERN0(DISABLE_W, block->steps.w)) axis_active.w = 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,
if (TERN0(DISABLE_U, bnext->steps.u)) axis_active.u = true,
if (TERN0(DISABLE_V, bnext->steps.v)) axis_active.v = true,
if (TERN0(DISABLE_W, bnext->steps.w)) axis_active.w = true
);
}
#endif
@ -1451,14 +1451,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 (NUM_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, || block->steps.i, || block->steps.j, || block->steps.k, || block->steps.u, || block->steps.v, || block->steps.w)) {
const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
NOLESS(high, se);

View File

@ -1022,7 +1022,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])