Drone_Exploration/User/component/LIGHTBRIDGE2_cmd.h
2025-11-23 11:50:10 +08:00

69 lines
1003 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#include "device/lightbridge2.h"
#define LIGHTBRIDGE2_CMD_REFEREE_MAX_NUM (3)
/* ??????? */
typedef enum {
MODE_CMD_BREAKING_CONTROL = 0,
MODE_CMD_ONLT_GIMBAL = 1,
MODE_CMD_FOLLOW = 2,
MODE_CMD_SPIN = 3,
} COMP_CMD_MODE_t;
typedef struct
{
bool online;
int8_t mode;
bool ai;
float ch_l_x;
float ch_l_y;
float ch_r_x;
float ch_r_y;
/* struct{
float x;
float y;
}chassis_ctrl_vec;
*/
struct{
float w;
}gimbal_yaw_ctrl_vec;
struct{
float w;
}gimbal_pit_ctrl_vec;
//struct
//{
// float yaw;
// float pitch;
// float roll;
//}drone_ctrl_vec;//无人机姿态控制量,预留,好像只需要云台与发射??
struct{
bool ready;
bool firecmd;
}shoot;
} COMP_LIGHTBRIDGE2_CMD_t;
int8_t COMP_LIGHTBRIDGE2_CMD_ParseRc(const DEVICE_LIGHTBRIDGE2_t *rc, COMP_LIGHTBRIDGE2_CMD_t *lightbridge2_cmd);
#ifdef __cplusplus
}
#endif