Files
1CAR/app_brake.h

35 lines
1.0 KiB
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.

#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