From e8cf82708801fa18cec51a770f13ce5673fadb94 Mon Sep 17 00:00:00 2001 From: Richie <2837357W@student.gla.ac.uk> Date: Mon, 20 Nov 2023 11:56:03 +0800 Subject: [PATCH] test+ --- frtos/motor/motor_direction.h | 6 +++--- frtos/rtos_car.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frtos/motor/motor_direction.h b/frtos/motor/motor_direction.h index 1ea5101..dfd0c2e 100644 --- a/frtos/motor/motor_direction.h +++ b/frtos/motor/motor_direction.h @@ -28,10 +28,10 @@ set_wheel_direction(uint32_t direction) } void -update_target_yaw(car_struct_t * pp_car_struct) +update_target_yaw(volatile direction_t * g_direction) { - updateDirection(pp_car_struct->p_direction); - pp_car_struct->p_direction->target_yaw = pp_car_struct->p_direction->yaw; + updateDirection(g_direction); + g_direction->target_yaw = g_direction->yaw; } /*! diff --git a/frtos/rtos_car.c b/frtos/rtos_car.c index 17de85f..bf511c4 100644 --- a/frtos/rtos_car.c +++ b/frtos/rtos_car.c @@ -23,7 +23,7 @@ void motor_control_task(void *params) { car_struct_t *car_struct = (car_struct_t *)params; - update_target_yaw(car_struct); + update_target_yaw(car_struct->p_direction); set_wheel_direction(DIRECTION_FORWARD); set_wheel_speed_synced(90u, car_struct); for (;;)