This commit is contained in:
Richie 2023-11-20 11:56:03 +08:00
parent c0aa48b58b
commit e8cf827088
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/*!

View File

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