Browse Source

Fix an acceleration anomaly by making locals signed

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

+ 1
- 1
Marlin/planner.cpp View File

941
 
941
 
942
   // Compute and limit the acceleration rate for the trapezoid generator.
942
   // Compute and limit the acceleration rate for the trapezoid generator.
943
   float steps_per_mm = block->step_event_count / block->millimeters;
943
   float steps_per_mm = block->step_event_count / block->millimeters;
944
-  unsigned long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS];
944
+  long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS];
945
   if (bsx == 0 && bsy == 0 && bsz == 0) {
945
   if (bsx == 0 && bsy == 0 && bsz == 0) {
946
     block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
946
     block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
947
   }
947
   }

Loading…
Cancel
Save