From e38baaa23e8bee189d4152c848451c44277b7c4c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Apr 2016 14:17:20 -0700 Subject: [PATCH] Fix an acceleration anomaly by making locals signed --- Marlin/planner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index e1ee240d8..f5062d2a7 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -941,7 +941,7 @@ float junction_deviation = 0.1; // Compute and limit the acceleration rate for the trapezoid generator. float steps_per_mm = block->step_event_count / block->millimeters; - unsigned long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS]; + long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS]; if (bsx == 0 && bsy == 0 && bsz == 0) { block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2 }