Merge commit '9d9acb4fdb42a2c604a232bdf3ce4178dc77f924'

This commit is contained in:
CSSC-WORK\murmur 2023-09-07 11:20:12 +08:00
commit 725f387f3e
3 changed files with 13 additions and 2 deletions

View File

@ -571,6 +571,8 @@ static void chkAndSendFile_thread_entry()
if (rst == RT_EOK) //条件2满足 if (rst == RT_EOK) //条件2满足
{ {
LOG_I("TT准备就绪"); LOG_I("TT准备就绪");
//当前固件底层未缓存待发数据,导致前几包数据可能丢失,暂时用延时规避
rt_thread_mdelay(2*60*1000);
getAndSendFile(); getAndSendFile();
break; break;
} }

View File

@ -511,6 +511,14 @@ static int getAndCheckLoc(uint8_t *dout, size_t pairCnt)
{ {
uint8_t loc[200]; uint8_t loc[200];
size_t cnt = getLoc(loc,pairCnt); 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) { if (!cnt) {
return 0; return 0;
// LOG_W("位置信息还未准备好。"); // 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; rst[8] |= 1<<7;
isReadyToSendLoc = 1; isReadyToSendLoc = 1;

View File

@ -460,7 +460,7 @@ void repGetTT_thread_entry(void* parameter)
appendInfo(rstInfo, RST_LEN, buffer, len); appendInfo(rstInfo, RST_LEN, buffer, len);
} }
rulecheck(); rulecheck();
rt_thread_mdelay(3 * 1000);//间隔3s更新一次数据 rt_thread_mdelay(5 * 1000);//间隔3s更新一次数据
} }
rt_memset(rstInfo,0x3f,RST_LEN);//初始化 rt_memset(rstInfo,0x3f,RST_LEN);//初始化
} }