第一次提交,修改保存刷写上位机IP

This commit is contained in:
2025-09-07 19:16:08 +08:00
commit 8242f618d1
58 changed files with 10917 additions and 0 deletions

34
app_brake.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef APP_BRAKE_H
#define APP_BRAKE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "app_config.h"
typedef struct {
Timer brake_timer; // 定时器结构体
int brake_command; // 刹车命令变量1表示刹车2表示释放
int brake_motor_state; // 刹车电机状态变量0停止1前进2后退
int brake_command_in_progress; // 刹车命令执行状态0表示空闲1表示正在执行
//输入
int emergency_stop_switch; // 急停开关
int remote_emergency_stop; // 遥控器急停开关
int remote_fault; // 遥控器故障
int can_bus_fault; // CAN总线故障
int ethernet_fault; // 以太网通信故障
int mode_signal; // 模式信号0表示手动模式1表示自动模式
} BrakeSystem;
// 在头文件中声明外部变量
extern BrakeSystem brake_system;
#ifdef __cplusplus
}
#endif
#endif // APP_BRAKE_H