/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2024-08-16 RuoFeng the first version */ #ifndef APPLICATIONS_WORK_XCT_H_ #define APPLICATIONS_WORK_XCT_H_ /*********************↓ define ↓************************/ #define Luxlimit_def 300 // 光控阈值 #define tempup_def 49 // 温度上限 #define tempdw_def 10 // 温度下限 #define gktime_def 3 // 默认光控时长 #define READ_TYPE_QUERY 0 // 查询模式:>=100%时不清零 #define READ_TYPE_JUDGE 1 // 判断模式:>=100%时自动清零 #define INR_Early 0 // 提前触发图片 /*********************↑ define ↑************************/ /** * * * * * */ /*********************↓ include ↓************************/ #include "stm32f1xx_hal.h" /*********************↑ include ↑************************/ /** * * * * * */ /*********************↓ extern ↓************************/ /*********************↑ extern ↑************************/ /** * * * * * */ /********************↓ declaration ↓***********************/ typedef struct { uint8_t temhumEN; uint8_t LuxEN; uint8_t RainEN; int16_t temp_up; int16_t temp_dw; int16_t humi_up; int16_t humi_dw; uint8_t LuxTime; }Limit; typedef struct { uint8_t start_work; // 是否开始工作 RTC_TimeTypeDef start_time; // 开始工作时间 uint16_t lux_set; // 出发光控的阈值 uint8_t Read; // 是否读取了参数 } Luxwork; typedef struct { uint8_t start_work; // 是否开始工作 uint8_t EN; // 是否开启 RTC_TimeTypeDef sunup_time; // 日出时间 RTC_TimeTypeDef sundown_time; // 日落时间 RTC_TimeTypeDef sunrise_time; // 天气接口日出 RTC_TimeTypeDef sunset_time; // 天气接口日落 RTC_TimeTypeDef start_time; // 开始工作时间 RTC_TimeTypeDef end_time; // 结束工作时间 uint8_t Read; // 是否读取了参数 uint16_t slux_set; // 触发 uint8_t lseek; // 前后提前时间(分钟) } Sunwork; typedef struct { uint8_t fan_speed; //风机速度(10-100) uint8_t Demo_mode; // 演示模式 uint32_t Demo_cnt; // 演示模式计数 uint8_t photo_finsh; // 拍照完成 uint8_t not_poweroff; // 拍照呢 别断电 uint8_t rtu_sta; // 是否正常的开机就绪了 uint16_t dattim; uint16_t photim; }SYSCFG; void WorkTask_XCT(void); /********************↑ declaration ↑***********************/ /** * * * * * */ /*********************↓ global variables ↓************************/ /*********************↑ global variables ↑************************/ /** * * * * * */ #endif /* APPLICATIONS_WORK_XCT_H_ */