Skip to content

Commit

Permalink
Fixed bug causing position control oscillation
Browse files Browse the repository at this point in the history
Do not use errMovingAverage on multiple signals
  • Loading branch information
dzid26 committed Jan 27, 2024
1 parent ec80c77 commit 69d5e68
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion firmware/src/BSP/stepper_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ bool StepperCtrl_processMotion(void)
}

speed_raw = (currentLoc - lastLoc) * (int32_t) SAMPLING_HZ; // deg/s*360/65536
speed_raw = errMovingAverage(speed_raw);
speed_slow = (speed_raw + (speed_filter_tc-1) * speed_slow) / speed_filter_tc;

int32_t error_flt = errMovingAverage(error);
Expand Down

0 comments on commit 69d5e68

Please sign in to comment.