2025-04-16 09:58:09 +08:00
|
|
|
#include "paini.h"
|
|
|
|
// 全局变量
|
|
|
|
uint32_t timer_1s_cnt = 0; // 1秒计数器
|
|
|
|
uint32_t timer_1min_cnt = 0; // 1分钟计数器
|
|
|
|
uint32_t timer_1hour_cnt = 0; // 1小时计数器
|
|
|
|
|
|
|
|
// 排泥控制函数
|
|
|
|
void Dredge_Control(void)
|
|
|
|
{
|
|
|
|
static uint8_t dredge_flag = 0;
|
|
|
|
|
|
|
|
if(dredge_flag && timer_1min_cnt >= 5) // 排泥5分钟
|
|
|
|
{
|
2025-05-20 09:41:22 +08:00
|
|
|
Control_Dredge(0); // 关闭排泥
|
2025-04-16 09:58:09 +08:00
|
|
|
dredge_flag = 0;
|
|
|
|
timer_1min_cnt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(timer_1hour_cnt >= 72) // 72小时到
|
|
|
|
{
|
|
|
|
timer_1hour_cnt = 0;
|
2025-05-20 09:41:22 +08:00
|
|
|
Control_Dredge(1); // 关闭排泥 // 开启排泥
|
2025-04-16 09:58:09 +08:00
|
|
|
dredge_flag = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|