This commit is contained in:
Richie 2023-11-20 14:54:15 +08:00
parent 7aedf85ca1
commit bd0ec58f06
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ distance_to_stop(car_struct_t * pp_car_struct, float distance_cm)
{ {
if (pp_car_struct->p_left_motor->speed.distance_cm - initial >= distance_cm) if (pp_car_struct->p_left_motor->speed.distance_cm - initial >= distance_cm)
{ {
set_wheel_speed_synced(0u); set_wheel_speed_synced(0u, pp_car_struct);
break; break;
} }
vTaskDelay(pdMS_TO_TICKS(10)); vTaskDelay(pdMS_TO_TICKS(10));