ソースを参照

Fix uninitialized var in reset_acceleration_rates

Scott Lahteine 8年前
コミット
3fcf915808
1個のファイルの変更3行の追加3行の削除
  1. 3
    3
      Marlin/planner.cpp

+ 3
- 3
Marlin/planner.cpp ファイルの表示

@@ -1321,12 +1321,12 @@ void Planner::set_position_mm(const AxisEnum axis, const float& v) {
1321 1321
 
1322 1322
 // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
1323 1323
 void Planner::reset_acceleration_rates() {
1324
-  uint32_t highest_acceleration_allaxes_steps_per_s2;
1324
+  uint32_t highest_rate = 1;
1325 1325
   LOOP_XYZE(i) {
1326 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 1332
 // Recalculate position, steps_to_mm if axis_steps_per_mm changes!

読み込み中…
キャンセル
保存