Files
Gimbal/application/robot_def.h
T
SkyLiCoder d56254d190 refactor: remove remote control, zero-force mode and emergency stop
- Remove RC_ctrl_t and RemoteControlInit from robot_cmd.c
- Delete GIMBAL_ZERO_FORCE, gimbal_mode_e, Robot_Status_e from robot_def.h
- Remove EmergencyHandler and robot_state from robot_cmd.c
- Remove emergency commands from master_machine.h
- Remove remote_control and can_comm from CMakeLists.txt
2026-05-30 01:14:00 +08:00

53 lines
1.1 KiB
C

#pragma once
#ifndef ROBOT_DEF_H
#define ROBOT_DEF_H
#include "ins_task.h"
#include "stdint.h"
/* 开发板类型定义 */
#define ONE_BOARD // 单板控制整车
//#define VISION_USE_VCP // 使用虚拟串口发送视觉数据
#define VISION_USE_UART // 使用串口发送视觉数据
/* 云台参数 */
#define YAW_CHASSIS_ALIGN_ECD 2711
#define PITCH_HORIZON_ECD 3412
#define PITCH_MAX_ANGLE 0
#define PITCH_MIN_ANGLE 0
/* IMU->云台方向 */
#define GYRO2GIMBAL_DIR_YAW 1
#define GYRO2GIMBAL_DIR_PITCH 1
#define GYRO2GIMBAL_DIR_ROLL 1
#pragma pack(1)
/* 应用状态 */
typedef enum
{
APP_OFFLINE = 0,
APP_ONLINE,
APP_ERROR,
} App_Status_e;
/* ---- CMD 发布给 gimbal 的控制数据 ---- */
typedef struct
{
float yaw; // yaw 目标角度 (degrees, multi-turn)
float pitch; // pitch 目标角度 (degrees)
} Gimbal_Ctrl_Cmd_s;
/* ---- gimbal 发布给 CMD 的反馈数据 ---- */
typedef struct
{
INS_t *gimbal_imu_data; // 指向 INS 实例的指针
uint16_t yaw_motor_single_round_angle;
uint8_t gimbal_power;
} Gimbal_Upload_Data_s;
#pragma pack()
#endif // !ROBOT_DEF_H