1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-02 16:59:03 +00:00

Merge pull request #3613 from thinkyhead/rc_acceleration_fix1

Fix an acceleration anomaly by making locals signed
This commit is contained in:
Scott Lahteine 2016-04-29 16:39:31 -07:00
commit eeef571be2

View File

@ -941,7 +941,7 @@ float junction_deviation = 0.1;
// Compute and limit the acceleration rate for the trapezoid generator. // Compute and limit the acceleration rate for the trapezoid generator.
float steps_per_mm = block->step_event_count / block->millimeters; 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) { if (bsx == 0 && bsy == 0 && bsz == 0) {
block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2 block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
} }