From a2328edbd7f4d301d70802adcf56b6d8bb189754 Mon Sep 17 00:00:00 2001 From: wangbeihong Date: Tue, 14 Apr 2026 19:32:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=AD=A3=E5=B7=A6=E5=8F=B3?= =?UTF-8?q?=E7=94=B5=E6=9C=BA=E7=89=A9=E7=90=86=E6=96=B9=E5=90=91=E5=B7=AE?= =?UTF-8?q?=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Bsp/bsp_motor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/Bsp/bsp_motor.c b/Core/Bsp/bsp_motor.c index 4ef1e09..a73d7fe 100644 --- a/Core/Bsp/bsp_motor.c +++ b/Core/Bsp/bsp_motor.c @@ -71,6 +71,11 @@ void motor_set_speed(motor_id_t motor_id, int16_t speed) default: return; } + /* 纠正左右电机物理方向差异 */ + if (motor_id == MOTOR_3 || motor_id == MOTOR_4) { + speed = -speed; + } + /* 限制速度范围 (ARR=3599) */ if (speed > 3599) speed = 3599; if (speed < -3599) speed = -3599;