From 033a0d3b2786802475123be58bfa51c2b44fcc5e Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Wed, 9 Sep 2026 15:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=94=B5=E6=9C=BA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E5=90=8E=E5=AF=BC=E8=87=B4CAN=E6=B2=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98=EF=BC=8C=E6=A0=B9=E5=9B=A0?= =?UTF-8?q?=E6=98=AF=E5=8F=91=E5=A4=AA=E5=BF=AB=E4=BA=86=E5=AF=BC=E8=87=B4?= =?UTF-8?q?CAN=E6=97=A0=E6=8E=A5=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- motor/msp_motor_leisai.c | 3 ++- project/paint_robot_new/paint_robot_new.c | 2 +- project/paint_robot_new/paint_robot_new_motors.c | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/motor/msp_motor_leisai.c b/motor/msp_motor_leisai.c index fa1a495..7249c53 100644 --- a/motor/msp_motor_leisai.c +++ b/motor/msp_motor_leisai.c @@ -420,7 +420,8 @@ static int LeiSai_ParseResponse(Motor_Instance_t *pstMotor, const uint8_t *pucDa iRealVelocity[1] = MotorMgr_SpeedConvertex(pstMotor, iRealVelocity[0]); iRealVelocity[0] = pstMotor->m_stConfig.m_ucMotorID; MsgCenter_SendTo(MODULE_NAME_CUSTOM, MOTOR_CMD_GET_SPEED, iRealVelocity, sizeof(iRealVelocity)); - break; + log_d("iRealVelocity[1] = %d", iRealVelocity[1]); + break; } default: break; diff --git a/project/paint_robot_new/paint_robot_new.c b/project/paint_robot_new/paint_robot_new.c index f5d29cd..e25e14e 100644 --- a/project/paint_robot_new/paint_robot_new.c +++ b/project/paint_robot_new/paint_robot_new.c @@ -85,7 +85,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) if (1 == iCurrentSpeed[0]) { g_stIV.CurrentSpeed = iCurrentSpeed[1]; - log_i("g_stIV.CurrentSpeed = %d", g_stIV.CurrentSpeed); + log_d("speed = %d", g_stIV.CurrentSpeed); } } break; diff --git a/project/paint_robot_new/paint_robot_new_motors.c b/project/paint_robot_new/paint_robot_new_motors.c index b2bff73..4f14ab3 100644 --- a/project/paint_robot_new/paint_robot_new_motors.c +++ b/project/paint_robot_new/paint_robot_new_motors.c @@ -167,13 +167,22 @@ void MotorTask(void *argument) { // 处理消息 MsgCenter_ProcessWait(g_uiMotorModuleID, 2); + Rd_Delay(2); MotorMgr_RequestPosition(g_apstMotors[0]); + Rd_Delay(2); MotorMgr_RequestPosition(g_apstMotors[1]); + Rd_Delay(2); MotorMgr_RequestFault(g_apstMotors[0]); + Rd_Delay(2); MotorMgr_RequestFault(g_apstMotors[1]); + Rd_Delay(2); MotorMgr_RequestVelocity(g_apstMotors[0]); + Rd_Delay(2); MotorMgr_RequestVelocity(g_apstMotors[1]); + Rd_Delay(2); MotorMgr_SetTargetSpeed(g_apstMotors[0], g_aiMotorSpeed[0]); + Rd_Delay(2); MotorMgr_SetTargetSpeed(g_apstMotors[1], g_aiMotorSpeed[1]); + Rd_Delay(2); } }