From f222315003395488569febb3959eff7fc4dca350 Mon Sep 17 00:00:00 2001 From: Richie <2837357W@student.gla.ac.uk> Date: Mon, 27 Nov 2023 17:16:08 +0800 Subject: [PATCH] test+ --- frtos/motor/motor_speed.h | 2 +- frtos/motor/motor_test.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frtos/motor/motor_speed.h b/frtos/motor/motor_speed.h index 40b69af..4b62386 100644 --- a/frtos/motor/motor_speed.h +++ b/frtos/motor/motor_speed.h @@ -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); } diff --git a/frtos/motor/motor_test.c b/frtos/motor/motor_test.c index 04e4e8f..1fe2984 100644 --- a/frtos/motor/motor_test.c +++ b/frtos/motor/motor_test.c @@ -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)); } }