Browse Source

【支线待合】这里把消息类型改为枚举

master
Lizongdi 19 hours ago
parent
commit
f09052e966
  1. 1
      RBcore/client_setting.c
  2. 3
      RBcore/include/BHBF.h
  3. 3
      RBcore/include/msg_center.h
  4. 1
      motor/msp_motor_leisai.c
  5. 1
      project/paint_robot_new/paint_robot_new_MK32.c
  6. 1
      project/paint_robot_new/paint_robot_new_motors.c

1
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"
/*----------------------------------------------*
* *

3
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 <stdint.h>
@ -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 {

3
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;

1
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"
/*----------------------------------------------*
* *

1
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"
/*----------------------------------------------*
* *

1
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"
/*----------------------------------------------*
* *

Loading…
Cancel
Save