From 107a142ef68eb6843762b243d4135adfdbb5314a Mon Sep 17 00:00:00 2001 From: Richie <2837357W@student.gla.ac.uk> Date: Thu, 9 Nov 2023 12:58:10 +0800 Subject: [PATCH] remove debug prints --- frtos/motor/motor_pid.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/frtos/motor/motor_pid.h b/frtos/motor/motor_pid.h index 62a9ff7..dd858e6 100644 --- a/frtos/motor/motor_pid.h +++ b/frtos/motor/motor_pid.h @@ -24,8 +24,6 @@ compute_pid(float *integral, float *prev_error, car_struct_t *car_struct) float error = car_struct->p_left_motor->speed.distance_cm - car_struct->p_right_motor->speed.distance_cm; - printf("%f\n", error); - *integral += error; float derivative = error - *prev_error; @@ -55,8 +53,6 @@ repeating_pid_handler(struct repeating_timer *t) float control_signal = compute_pid(&integral, &prev_error, car_strut); - printf("control: %f\n", control_signal); - float temp = (float)car_strut->p_right_motor->pwm.level + control_signal * 0.05f; @@ -70,13 +66,8 @@ repeating_pid_handler(struct repeating_timer *t) temp = MIN_PWM_LEVEL + 1u; } - printf("temp: %f\n", temp); - set_wheel_speed((uint32_t)temp, car_strut->p_right_motor); - printf("speed: %f cm/s\n", car_strut->p_right_motor->speed.current_cms); - printf("distance: %f cm\n", car_strut->p_right_motor->speed.distance_cm); - return true; }