Files
base/app/app_base.h
2025-08-26 10:53:01 +08:00

56 lines
1.2 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 BASE_H
#define BASE_H
#ifdef __cplusplus
extern "C" {
#endif
// 定义刹车状态机状态
typedef enum {
BASE_STOP,
BASE_UP,
BASE_DOWN,
} baseState;
typedef struct BaseSystem
{
uint32_t start_time;
Timer base_timer; // 定时器结构体
uint8_t base_command; // 输出基站命令变量0停止,1上升,2下降
uint8_t base_state; // 基站状态1表示上升中,2表示下降中3已上升到固定位置4已下降固定位置
uint8_t mode; // 遥控模式02手动1自动
uint8_t Left_switch; // 左侧限位开关
uint8_t right_switch; // 右侧限位开关
uint8_t emergency_stop_switch; // 急停开关,按下急停,上升和下降都急停。
uint8_t remote_emergency_stop; // 远程急停开关,按下急停,上升和下降都急停。
int16_t input_data; // 输入遥感数据,正数,上升,负数下降
} BaseSystem;
#define REMOTE_ZERO 1022
#define REMOTE_DEADBAND 50
void baseAppInit(void);
#ifdef __cplusplus
}
#endif
#endif // BASE_H