shoot2/User/component/at9s_pro_cmd.h
2025-09-29 19:39:26 +08:00

62 lines
980 B
C
Raw Permalink Blame History

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#include "device/at9s_pro.h"
#define DR16_CMD_REFEREE_MAX_NUM (3) /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
/* <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB> */
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; /* <20><>ҡ<EFBFBD><D2A1> X */
float ch_l_y; /* <20><>ҡ<EFBFBD><D2A1> Y<><59><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD> */
float ch_r_x; /* <20><>ҡ<EFBFBD><D2A1> X */
float ch_r_y; /* <20><>ҡ<EFBFBD><D2A1> Y */
struct{
float x;
float y;
}chassis_ctrl_vec;
struct{
float w;
}gimbal_yaw_ctrl_vec;
struct{
float w;
}gimbal_pit_ctrl_vec;
struct{
bool ready;
bool firecmd;
}shoot;
} COMP_AT9S_CMD_t;
int8_t COMP_AT9S_CMD_ParseRc(const DEVICE_AT9S_t *rc, COMP_AT9S_CMD_t *at9s_cmd);
#ifdef __cplusplus
}
#endif