mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
更新了视觉上位机和CAN多机通信的文档
This commit is contained in:
@@ -7,6 +7,78 @@
|
||||
#define VISION_RECV_SIZE 36u
|
||||
#define VISION_SEND_SIZE 36u
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NO_FIRE = 0,
|
||||
AUTO_FIRE = 1,
|
||||
AUTO_AIM = 2
|
||||
} Fire_Mode_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NO_TARGET = 0,
|
||||
TARGET_CONVERGING = 1,
|
||||
READY_TO_FIRE = 2
|
||||
} Target_State_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NO_TARGET_NUM = 0,
|
||||
HERO1 = 1,
|
||||
ENGINEER2 = 2,
|
||||
INFANTRY3 = 3,
|
||||
INFANTRY4 = 4,
|
||||
INFANTRY5 = 5,
|
||||
OUTPOST = 6,
|
||||
SENTRY = 7,
|
||||
BASE = 8
|
||||
} Target_Type_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Fire_Mode_e fire_mode;
|
||||
Target_State_e target_state;
|
||||
Target_Type_e target_type;
|
||||
|
||||
float pitch;
|
||||
float yaw;
|
||||
} Vision_Recv_s;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BLUE = 0,
|
||||
RED = 1
|
||||
} Enemy_Color_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MODE_AIM = 0,
|
||||
MODE_SMALL_BUFF = 1,
|
||||
MODE_BIG_BUFF = 2
|
||||
} Work_Mode_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BIG_AMU_10 = 10,
|
||||
SMALL_AMU_15 = 15,
|
||||
BIG_AMU_16 = 16,
|
||||
SMALL_AMU_18 = 18,
|
||||
SMALL_AMU_30 = 30,
|
||||
} Bullet_Speed_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Enemy_Color_e enemy_color;
|
||||
Work_Mode_e work_mode;
|
||||
Bullet_Speed_e bullet_speed;
|
||||
|
||||
float yaw;
|
||||
float pitch;
|
||||
float roll;
|
||||
|
||||
// uint32_t time_stamp; // @todo 用于和相机的时间戳对齐
|
||||
} Vision_Send_s;
|
||||
|
||||
/**
|
||||
* @brief 调用此函数初始化和视觉的串口通信
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user