Browse Source

Fix uninitialized var in reset_acceleration_rates

Scott Lahteine 8 years ago
parent
commit
3fcf915808
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/planner.cpp

+ 3
- 3
Marlin/planner.cpp View File

1321
 
1321
 
1322
 // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
1322
 // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
1323
 void Planner::reset_acceleration_rates() {
1323
 void Planner::reset_acceleration_rates() {
1324
-  uint32_t highest_acceleration_allaxes_steps_per_s2;
1324
+  uint32_t highest_rate = 1;
1325
   LOOP_XYZE(i) {
1325
   LOOP_XYZE(i) {
1326
     max_acceleration_steps_per_s2[i] = max_acceleration_mm_per_s2[i] * axis_steps_per_mm[i];
1326
     max_acceleration_steps_per_s2[i] = max_acceleration_mm_per_s2[i] * axis_steps_per_mm[i];
1327
-    if (max_acceleration_steps_per_s2[i] > highest_acceleration_allaxes_steps_per_s2) highest_acceleration_allaxes_steps_per_s2 = max_acceleration_steps_per_s2[i];
1327
+    NOLESS(highest_rate, max_acceleration_steps_per_s2[i]);
1328
   }
1328
   }
1329
-  cutoff_long = 4294967295UL / highest_acceleration_allaxes_steps_per_s2;
1329
+  cutoff_long = 4294967295UL / highest_rate;
1330
 }
1330
 }
1331
 
1331
 
1332
 // Recalculate position, steps_to_mm if axis_steps_per_mm changes!
1332
 // Recalculate position, steps_to_mm if axis_steps_per_mm changes!

Loading…
Cancel
Save