河北水利局项目
This commit is contained in:
39
rp/rparrivetime.c
Normal file
39
rp/rparrivetime.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "stdafx.h"
|
||||
#include "rtc_ext.h"
|
||||
//#include "frame3762task.h"
|
||||
|
||||
extern u32 time_cur;
|
||||
|
||||
static bool is_rptimearrive_flag = false;
|
||||
static u32 rptime_cur = 0;
|
||||
|
||||
void report_time_set()
|
||||
{
|
||||
is_rptimearrive_flag = true;
|
||||
}
|
||||
|
||||
|
||||
bool is_report_time()
|
||||
{
|
||||
st_rtc_ext * time_dat = NULL;
|
||||
time_dat = (st_rtc_ext *)GetCurrentTime();
|
||||
if(time_dat->hour == 0x07 && time_dat->min == 0x30 && (is_rptimearrive_flag==false))
|
||||
{
|
||||
is_rptimearrive_flag = true;
|
||||
rptime_cur = time_cur;
|
||||
}
|
||||
|
||||
if(is_rptimearrive_flag)
|
||||
{
|
||||
if(time_cur-rptime_cur > 2*60)
|
||||
{
|
||||
printf("\r\n**************** Ëĵãʱ¼äµ½ Æô¶¯Éϱ¨ ********\r\n");
|
||||
is_rptimearrive_flag = false;
|
||||
rptime_cur = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user