Browse Source

🩹 Fix Fan Tail Speed Init (#24076)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Mike La Spina 2 years ago
parent
commit
726a38712e
No account linked to committer's email address
2 changed files with 16 additions and 16 deletions
  1. 15
    15
      Marlin/src/module/planner.cpp
  2. 1
    1
      Marlin/src/module/planner.h

+ 15
- 15
Marlin/src/module/planner.cpp View File

@@ -1306,7 +1306,7 @@ void Planner::check_axes_activity() {
1306 1306
 
1307 1307
   #if HAS_FAN && DISABLED(LASER_SYNCHRONOUS_M106_M107)
1308 1308
     #define HAS_TAIL_FAN_SPEED 1
1309
-    static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 128);
1309
+    static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 13);
1310 1310
     bool fans_need_update = false;
1311 1311
   #endif
1312 1312
 
@@ -1342,18 +1342,18 @@ void Planner::check_axes_activity() {
1342 1342
 
1343 1343
     #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_E)
1344 1344
       for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1345
-        block_t *block = &block_buffer[b];
1345
+        block_t * const bnext = &block_buffer[b];
1346 1346
         LOGICAL_AXIS_CODE(
1347
-          if (TERN0(DISABLE_E, block->steps.e)) axis_active.e = true,
1348
-          if (TERN0(DISABLE_X, block->steps.x)) axis_active.x = true,
1349
-          if (TERN0(DISABLE_Y, block->steps.y)) axis_active.y = true,
1350
-          if (TERN0(DISABLE_Z, block->steps.z)) axis_active.z = true,
1351
-          if (TERN0(DISABLE_I, block->steps.i)) axis_active.i = true,
1352
-          if (TERN0(DISABLE_J, block->steps.j)) axis_active.j = true,
1353
-          if (TERN0(DISABLE_K, block->steps.k)) axis_active.k = true,
1354
-          if (TERN0(DISABLE_U, block->steps.u)) axis_active.u = true,
1355
-          if (TERN0(DISABLE_V, block->steps.v)) axis_active.v = true,
1356
-          if (TERN0(DISABLE_W, block->steps.w)) axis_active.w = true
1347
+          if (TERN0(DISABLE_E, bnext->steps.e)) axis_active.e = true,
1348
+          if (TERN0(DISABLE_X, bnext->steps.x)) axis_active.x = true,
1349
+          if (TERN0(DISABLE_Y, bnext->steps.y)) axis_active.y = true,
1350
+          if (TERN0(DISABLE_Z, bnext->steps.z)) axis_active.z = true,
1351
+          if (TERN0(DISABLE_I, bnext->steps.i)) axis_active.i = true,
1352
+          if (TERN0(DISABLE_J, bnext->steps.j)) axis_active.j = true,
1353
+          if (TERN0(DISABLE_K, bnext->steps.k)) axis_active.k = true,
1354
+          if (TERN0(DISABLE_U, bnext->steps.u)) axis_active.u = true,
1355
+          if (TERN0(DISABLE_V, bnext->steps.v)) axis_active.v = true,
1356
+          if (TERN0(DISABLE_W, bnext->steps.w)) axis_active.w = true
1357 1357
         );
1358 1358
       }
1359 1359
     #endif
@@ -1451,14 +1451,14 @@ void Planner::check_axes_activity() {
1451 1451
    * currently in the planner.
1452 1452
    */
1453 1453
   void Planner::autotemp_task() {
1454
-    static float oldt = 0;
1454
+    static float oldt = 0.0f;
1455 1455
 
1456 1456
     if (!autotemp_enabled) return;
1457 1457
     if (thermalManager.degTargetHotend(active_extruder) < autotemp_min - 2) return; // Below the min?
1458 1458
 
1459
-    float high = 0.0;
1459
+    float high = 0.0f;
1460 1460
     for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1461
-      block_t *block = &block_buffer[b];
1461
+      const block_t * const block = &block_buffer[b];
1462 1462
       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)) {
1463 1463
         const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
1464 1464
         NOLESS(high, se);

+ 1
- 1
Marlin/src/module/planner.h View File

@@ -1022,7 +1022,7 @@ class Planner {
1022 1022
         return limit_value;
1023 1023
       }
1024 1024
 
1025
-    #endif // !CLASSIC_JERK
1025
+    #endif // HAS_JUNCTION_DEVIATION
1026 1026
 };
1027 1027
 
1028 1028
 #define PLANNER_XY_FEEDRATE() _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS])

Loading…
Cancel
Save