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 (;;)