From f09052e9665da859c7e59509fbdedf4e26db54af Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Wed, 9 Sep 2026 09:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=94=AF=E7=BA=BF=E5=BE=85=E5=90=88?= =?UTF-8?q?=E3=80=91=E8=BF=99=E9=87=8C=E6=8A=8A=E6=B6=88=E6=81=AF=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=94=B9=E4=B8=BA=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RBcore/client_setting.c | 1 + RBcore/include/BHBF.h | 3 +-- RBcore/include/msg_center.h | 3 ++- motor/msp_motor_leisai.c | 1 + project/paint_robot_new/paint_robot_new_MK32.c | 1 + project/paint_robot_new/paint_robot_new_motors.c | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RBcore/client_setting.c b/RBcore/client_setting.c index 60110ad..d66f2d4 100644 --- a/RBcore/client_setting.c +++ b/RBcore/client_setting.c @@ -22,6 +22,7 @@ #include "pb_encode.h" #include "bsp_PV.pb.h" #include "bsp_IV.pb.h" +#include "msg_center.h" /*----------------------------------------------* * 外部变量说明 * diff --git a/RBcore/include/BHBF.h b/RBcore/include/BHBF.h index 83448b2..6256c58 100644 --- a/RBcore/include/BHBF.h +++ b/RBcore/include/BHBF.h @@ -61,7 +61,6 @@ extern "C"{ *----------------------------------------------*/ #include "drv_interface.h" #include "rd_time.h" -#include "msg_center.h" #include "cmsis_os.h" #include "FreeRTOS.h" #include @@ -99,7 +98,7 @@ typedef enum { CUSTOM_GET_TL720D_ROLL, // 获取陀螺仪横滚角 CUSTOM_CMD_PAINTGUN, // 控制喷枪 CUSTOM_CMD_END = 0x0300, -} Motor_Cmd_e; +} BHBF_Cmd_e; // 电机命令数据结构 typedef struct { diff --git a/RBcore/include/msg_center.h b/RBcore/include/msg_center.h index c3518f9..d67e9cf 100644 --- a/RBcore/include/msg_center.h +++ b/RBcore/include/msg_center.h @@ -30,6 +30,7 @@ extern "C"{ * include header files * *----------------------------------------------*/ #include "common.h" +#include "BHBF.h" /*==============================================* * constants or macros define * @@ -48,7 +49,7 @@ extern "C"{ typedef struct { uint32_t m_uiSrcModule; // 源模块ID uint32_t m_uiDstModule; // 目标模块ID - uint32_t m_uiMsgID; // 消息ID(命令字) + BHBF_Cmd_e m_uiMsgID; // 消息ID(命令字) uint32_t m_uiDataLen; // 数据长度 uint8_t m_aucData[MSG_CENTER_MAX_DATA_SIZE]; // 消息数据 } Msg_t; diff --git a/motor/msp_motor_leisai.c b/motor/msp_motor_leisai.c index 6e3bc29..fa1a495 100644 --- a/motor/msp_motor_leisai.c +++ b/motor/msp_motor_leisai.c @@ -20,6 +20,7 @@ #include "msp_motor_leisai.h" #include "rd_time.h" #include "BHBF.h" +#include "msg_center.h" /*----------------------------------------------* * 外部变量说明 * diff --git a/project/paint_robot_new/paint_robot_new_MK32.c b/project/paint_robot_new/paint_robot_new_MK32.c index 263bcc9..d68f69a 100644 --- a/project/paint_robot_new/paint_robot_new_MK32.c +++ b/project/paint_robot_new/paint_robot_new_MK32.c @@ -18,6 +18,7 @@ ******************************************************************************/ #include "BHBF.h" #include "Protobuf/PSource/msp_MK32.pb.h" +#include "msg_center.h" /*----------------------------------------------* * 外部变量说明 * diff --git a/project/paint_robot_new/paint_robot_new_motors.c b/project/paint_robot_new/paint_robot_new_motors.c index 3612f16..8cf75f8 100644 --- a/project/paint_robot_new/paint_robot_new_motors.c +++ b/project/paint_robot_new/paint_robot_new_motors.c @@ -19,6 +19,7 @@ #include "BHBF.h" #include "motor_manager.h" #include "msp_motor_leisai.h" +#include "msg_center.h" /*----------------------------------------------* * 外部变量说明 *