Skip to content

Commit

Permalink
Merge pull request #350 from Paciente8159/349-bug-random-acceleration…
Browse files Browse the repository at this point in the history
…-issues

resets motion block max_accel after each line
  • Loading branch information
Paciente8159 committed Jan 5, 2023
2 parents 93b80f3 + 2b929f2 commit 2ee8736
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uCNC/src/core/motion_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ uint8_t mc_line(float *target, motion_data_t *block_data)

// stores the new position for the next motion
memcpy(mc_last_target, target, sizeof(mc_last_target));
// restores feed and clears max acceleration to enable recalculation on next motion
block_data->feed = feed;
block_data->max_accel = 0;
return error;
}

Expand Down Expand Up @@ -684,7 +686,7 @@ uint8_t mc_home_axis(uint8_t axis, uint8_t axis_limit)
{
float target[AXIS_COUNT];
uint8_t axis_mask = (1 << axis);
motion_data_t block_data;
motion_data_t block_data = {0};
uint8_t limits_flags;

cnc_unlock(true);
Expand Down

0 comments on commit 2ee8736

Please sign in to comment.