From f0004d1f8e811e5927fd1988a319b23f0b169ab2 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Thu, 8 Oct 2026 10:52:08 +0800 Subject: [PATCH] =?UTF-8?q?BHBF.h=E5=91=BD=E5=90=8D=E9=87=87=E5=8F=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=BB=B4=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RBcore/TL720D.c | 2 +- RBcore/client_setting.c | 4 ++-- RBcore/daemon_task.c | 14 +++++++------- RBcore/include/BHBF.h | 14 +++++++------- controller/msp_MK32.c | 2 +- project/paint_robot_new/paint_robot_new.c | 10 +++++----- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/RBcore/TL720D.c b/RBcore/TL720D.c index 8881d8c..e517798 100644 --- a/RBcore/TL720D.c +++ b/RBcore/TL720D.c @@ -129,7 +129,7 @@ static void decode_TL720D(const char *buf, uint32_t _iSize) { uiLastSendTick = uiNowTick; MsgCenter_SendTo(MODULE_NAME_CUSTOM, GET_TL720D_ROLL, (void *)&g_stTL720D.RF_Angle_Roll, sizeof(int32_t)); - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_TL720D, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_TL720D, NULL, 0); } } diff --git a/RBcore/client_setting.c b/RBcore/client_setting.c index f58307e..c48819f 100644 --- a/RBcore/client_setting.c +++ b/RBcore/client_setting.c @@ -82,8 +82,8 @@ void decode_PV(const char *_pBuffer, uint32_t _iSize) if(decoded_PV_variable.TimeStamp>decoded_PV.TimeStamp) { - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_MK32_SERIAL, NULL, 0); - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_MK32_UDP, NULL, 0);// udp还没实现这里先防止报错 + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_MK32_SERIAL, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_MK32_UDP, NULL, 0);// udp还没实现这里先防止报错 decoded_PV=decoded_PV_variable; MsgCenter_SendTo(MODULE_NAME_CUSTOM, GET_PV, (void *)&decoded_PV, sizeof(decoded_PV)); } diff --git a/RBcore/daemon_task.c b/RBcore/daemon_task.c index 3dff6a4..6cdd048 100644 --- a/RBcore/daemon_task.c +++ b/RBcore/daemon_task.c @@ -124,37 +124,37 @@ static void daemon_ModuleHandler(const Msg_t *pstMsg) switch (pstMsg->m_uiMsgID) { - case DAEMON_SET_MK32_SBUS: + case SET_DAEMON_MK32_SBUS: { SET_BIT_1(&g_iCom_Error_Code, ComError_MK32_SBus); break; } - case DAEMON_SET_TL720D: + case SET_DAEMON_TL720D: { SET_BIT_1(&g_iCom_Error_Code, ComError_TL720D); break; } - case DAEMON_SET_LEFT_MOTOR: + case SET_DAEMON_LEFT_MOTOR: { SET_BIT_1(&g_iCom_Error_Code, ComError_LS_LeftMotor); break; } - case DAEMON_SET_RIGHT_MOTOR: + case SET_DAEMON_RIGHT_MOTOR: { SET_BIT_1(&g_iCom_Error_Code, ComError_LS_RightMotor); break; } - case DAEMON_SET_BUTTON_RESET: + case SET_DAEMON_BUTTON_RESET: { SET_BIT_1(&g_iCom_Error_Code, ComError_Remote_Button_Reset_State); break; } - case DAEMON_SET_MK32_SERIAL: + case SET_DAEMON_MK32_SERIAL: { SET_BIT_1(&g_iCom_Error_Code, ComError_MK32_Serial); break; } - case DAEMON_SET_MK32_UDP: + case SET_DAEMON_MK32_UDP: { SET_BIT_1(&g_iCom_Error_Code, ComError_MK32_UDP); break; diff --git a/RBcore/include/BHBF.h b/RBcore/include/BHBF.h index 6e031c9..6bfb3a4 100644 --- a/RBcore/include/BHBF.h +++ b/RBcore/include/BHBF.h @@ -99,13 +99,13 @@ typedef enum { CMD_STOP_AFTER_PAINTOFF, // 先关枪后停车 SET_STOP_OFF_PAINT, // 停车关枪CMD_STOP_AFTER_PAINTOFF标志位置1 RESET_PAINT, // 停车关枪CMD_STOP_AFTER_PAINTOFF逻辑中用于重置开枪状态 - DAEMON_SET_MK32_SBUS, // 置位ComError_MK32_SBus - DAEMON_SET_TL720D, // 置位ComError_TL720D - DAEMON_SET_LEFT_MOTOR, // 置位ComError_LS_LeftMotor - DAEMON_SET_RIGHT_MOTOR, // 置位ComError_LS_RightMotor - DAEMON_SET_BUTTON_RESET, // 置位ComError_Remote_Button_Reset_State - DAEMON_SET_MK32_SERIAL, // 置位ComError_MK32_Serial - DAEMON_SET_MK32_UDP, // 置位ComError_MK32_UDP + SET_DAEMON_MK32_SBUS, // 置位ComError_MK32_SBus + SET_DAEMON_TL720D, // 置位ComError_TL720D + SET_DAEMON_LEFT_MOTOR, // 置位ComError_LS_LeftMotor + SET_DAEMON_RIGHT_MOTOR, // 置位ComError_LS_RightMotor + SET_DAEMON_BUTTON_RESET, // 置位ComError_Remote_Button_Reset_State + SET_DAEMON_MK32_SERIAL, // 置位ComError_MK32_Serial + SET_DAEMON_MK32_UDP, // 置位ComError_MK32_UDP } BHBF_Cmd_e; #define THREAD_DEFAULT_STACK 4096 diff --git a/controller/msp_MK32.c b/controller/msp_MK32.c index 8adeb5d..9332bd9 100644 --- a/controller/msp_MK32.c +++ b/controller/msp_MK32.c @@ -117,7 +117,7 @@ void decode_MK32(const char *buf, uint32_t _iSize) uiLastSendTick = uiNowTick; MsgCenter_SendTo(MODULE_NAME_CUSTOM, GET_MK32, (void *)&RB_MK32, sizeof(RB_MK32)); - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_MK32_SBUS, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_MK32_SBUS, NULL, 0); } } diff --git a/project/paint_robot_new/paint_robot_new.c b/project/paint_robot_new/paint_robot_new.c index 3bcc58d..779f05f 100644 --- a/project/paint_robot_new/paint_robot_new.c +++ b/project/paint_robot_new/paint_robot_new.c @@ -753,12 +753,12 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) if (uiFailtCode[0] == 1) { g_stIV.Left_Motor_Err = uiFailtCode[1]; - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_LEFT_MOTOR, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_LEFT_MOTOR, NULL, 0); } else if (uiFailtCode[0] == 2) { g_stIV.Right_Motor_Err = uiFailtCode[1]; - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_RIGHT_MOTOR, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_RIGHT_MOTOR, NULL, 0); } } break; @@ -772,11 +772,11 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) if (1 == iCurrentSpeed[0]) { g_stIV.CurrentSpeed = iCurrentSpeed[1]; - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_LEFT_MOTOR, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_LEFT_MOTOR, NULL, 0); } else { - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_RIGHT_MOTOR, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_RIGHT_MOTOR, NULL, 0); } } break; @@ -848,7 +848,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } else { - MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_BUTTON_RESET, NULL, 0); + MsgCenter_SendTo(MODULE_NAME_DAEMON, SET_DAEMON_BUTTON_RESET, NULL, 0); } if (iMotorOK == 0) // 电机还没初始化完,不执行后边