1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Revert acceleration limiting to avoid overflow

This commit is contained in:
Scott Lahteine 2016-10-17 17:08:41 -05:00 committed by GitHub
parent 6ae5cf17a9
commit dc2cb8454c

View File

@ -1021,8 +1021,8 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
} }
else { else {
#define LIMIT_ACCEL(AXIS) do{ \ #define LIMIT_ACCEL(AXIS) do{ \
const uint32_t comp = max_acceleration_steps_per_s2[AXIS] * block->step_event_count; \ if (max_acceleration_steps_per_s2[AXIS] < (accel * block->steps[AXIS]) / block->step_event_count)
if (accel * block->steps[AXIS] > comp) accel = comp / block->steps[AXIS]; \ accel = (max_acceleration_steps_per_s2[AXIS] * block->step_event_count) / block->steps[AXIS];
}while(0) }while(0)
// Start with print or travel acceleration // Start with print or travel acceleration