Files
tronone-h7-scaffold/User_Code/module/paramdef/robot_def.h
2025-11-05 15:01:47 +08:00

22 lines
811 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// #pragma once // 可以用#pragma once代替#ifndef ROBOT_DEF_H(header guard)
#ifndef ROBOT_DEF_H
#define ROBOT_DEF_H
typedef enum
{
NORMAL_MODE = 0, // 正常模式对应数值0
SYS_ERROR_OCCURRED = 1, // 系统错误对应数值1
REMOTE_NOT_CONNECTED = 2, // 遥控器未连接对应数值2
REMOTE_CONNECTED = 3, // 遥控器已连接对应数值3
AUTO_SHOOTING_MODE = 4, // 成功进入自动瞄准模式对应数值4
IMU_CALIBERATION_MODE = 5 // IMU校准模式对应数值5
// 添加其他模式
} RobotMode_t; //机器人控制模式
// 声明并初始化变量
RobotMode_t RobotMode = REMOTE_NOT_CONNECTED; // 初始状态为遥控器未连接
// #pragma pack() // 开启字节对齐,结束前面的#pragma pack(1)
#endif