You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 lines
1.7 KiB

#pragma once
#include <stdbool.h>
#include <stdint.h>
typedef enum {
klevel1 = 0,
klevel2,
} level_t;
typedef enum {
knormal,
ktimingMode,
kintermittentMode,
} mode_t;
typedef enum {
knone_active,
kchange_level_input,
kchange_countdonw_time_input,
kchange_intermittentmode_time_input,
} active_input_t;
typedef enum {
knoneException,
kOzonePrimaryCircuitAnomaly, //臭氧一级回路异常,MOS断路,或者变压器断路,如果MOS短路,设备会直接无法启动
kOzoneSecondaryCircuitAnomaly, //臭氧二级回路异常,臭氧发生棒无法击穿产生臭氧,可能是焊接问题,或者接触不良
kfanIsBroken, //风扇故障
} error_t;
typedef struct {
bool poweron;
mode_t mode;
level_t level;
active_input_t active_input; //由human_computer_interaction_service维护
uint32_t active_start_ticket; //由human_computer_interaction_service维护
int countdonwnum;
int countdonwnum_s;
int countdonw_setting_num;
uint32_t countdonw_start_ticket;
// bool intermittentMode_idle;
bool working;
} ThisDevice_t;
#define kconst_flash_auto_close_time (1500) //按键输入状态有效时间
#define kconst_countdown_step_s (10) //倒计时每按一次按键,倒计时增加时间
#define kconst_active_input_light_flick_interval_ms (150) //按键输入状态闪烁间隔时间
#define INTERMITTENTMODE_PERIOD_S 55 //间歇工作模式的时间间隔,至少大于四倍的kconst_countdown_step_s
#define KEY_PERIOD 20 //
#define EXCEPTION_CHECK_PERIOD 50 //
extern ThisDevice_t thisDevice;