From 69d5e68a3020cc2ce0c53d5281324a76232bbfbd Mon Sep 17 00:00:00 2001 From: dzid26 Date: Sat, 27 Jan 2024 15:21:29 +0000 Subject: [PATCH] Fixed bug causing position control oscillation Do not use errMovingAverage on multiple signals --- firmware/src/BSP/stepper_controller.c | 1 - 1 file changed, 1 deletion(-) diff --git a/firmware/src/BSP/stepper_controller.c b/firmware/src/BSP/stepper_controller.c index ef5e001..107a615 100644 --- a/firmware/src/BSP/stepper_controller.c +++ b/firmware/src/BSP/stepper_controller.c @@ -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);