diff --git a/applications/core.c b/applications/core.c index 14e2a03..e32f4a6 100644 --- a/applications/core.c +++ b/applications/core.c @@ -571,6 +571,8 @@ static void chkAndSendFile_thread_entry() if (rst == RT_EOK) //条件2满足 { LOG_I("TT准备就绪"); + //当前固件底层未缓存待发数据,导致前几包数据可能丢失,暂时用延时规避 + rt_thread_mdelay(2*60*1000); getAndSendFile(); break; } diff --git a/applications/func/func.c b/applications/func/func.c index 92c770e..fd418f4 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -511,6 +511,14 @@ static int getAndCheckLoc(uint8_t *dout, size_t pairCnt) { uint8_t loc[200]; size_t cnt = getLoc(loc,pairCnt); + + //定位故障,临时填充数据 + if (!cnt) { + LOG_W("NONE Loc data, using 0x37 replaced"); + cnt = pairCnt*10; + memset(loc,0x37,cnt); + } + if (!cnt) { return 0; // LOG_W("位置信息还未准备好。"); @@ -781,7 +789,8 @@ void reportLoc_thread_entry(void *parameter) } //检测是否在围栏内 - if (len && !isInFence(rst+len-11-4))//不在围栏内 + uint8_t isLocOk[]={0x37,0x37,0x37}; + if (memcmp(rst+len-11-4,isLocOk,sizeof(isLocOk)) != 0 && !isInFence(rst+len-11-4))//不在围栏内。定位正常才判断围栏 { rst[8] |= 1<<7; isReadyToSendLoc = 1; diff --git a/applications/getinfo.c b/applications/getinfo.c index cb6a9ed..d6833b2 100644 --- a/applications/getinfo.c +++ b/applications/getinfo.c @@ -460,7 +460,7 @@ void repGetTT_thread_entry(void* parameter) appendInfo(rstInfo, RST_LEN, buffer, len); } rulecheck(); - rt_thread_mdelay(3 * 1000);//间隔3s更新一次数据 + rt_thread_mdelay(5 * 1000);//间隔3s更新一次数据 } rt_memset(rstInfo,0x3f,RST_LEN);//初始化 }