河北水利局项目

This commit is contained in:
2025-12-15 16:07:49 +08:00
commit f11a7c2b95
1146 changed files with 452892 additions and 0 deletions

45
dl/dlarrivetime.c Normal file
View File

@@ -0,0 +1,45 @@
#include "include.h"
#include "rtc_ext.h"
/*
抄表过程
*/
extern u32 time_cur;
static bool is_dltimearrive = false;
static u32 dltime_cur = 0;
void dl_set()
{
is_dltimearrive = true;
}
bool is_dl_time()
{
st_rtc_ext * time_dat = NULL;
time_dat = (st_rtc_ext *)GetCurrentTime();
if(time_dat->hour == 0x01 && time_dat->min == 0x01 && is_dltimearrive == false)
{
is_dltimearrive = true;
dltime_cur = time_cur;
}
if(is_dltimearrive)
{
if(time_cur-dltime_cur > 2*60)
{
printf("\r\n**************** 一点时间到 启动抄表开始 ********\r\n");
is_dltimearrive = false;
return true;
}
}
return false;
}