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); } }