test+
This commit is contained in:
parent
c7b9625983
commit
f222315003
|
@ -102,7 +102,7 @@ set_wheel_speed(uint32_t pwm_level, motor_t *p_motor)
|
|||
void
|
||||
set_wheel_speed_synced(uint32_t pwm_level, car_struct_t *pp_car_strut)
|
||||
{
|
||||
set_wheel_speed(MAX_PWM_LEVEL, pp_car_strut->p_left_motor);
|
||||
set_wheel_speed(pwm_level, pp_car_strut->p_left_motor);
|
||||
set_wheel_speed(pwm_level, pp_car_strut->p_right_motor);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@ void
|
|||
motor_control_task(void *params)
|
||||
{
|
||||
car_struct_t *car_struct = (car_struct_t *)params;
|
||||
set_wheel_direction(DIRECTION_FORWARD);
|
||||
set_wheel_speed_synced(62u, car_struct);
|
||||
for (;;)
|
||||
{
|
||||
turn_by_10_degree(RIGHT, 90u, car_struct);
|
||||
// turn_by_10_degree(RIGHT, 90u, car_struct);
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue