From d34578dece1180da67c330545ba362a21cdc0467 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Wed, 6 Sep 2023 17:25:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=9C=AA=E8=A7=A3=E5=86=B3=EF=BC=8C=E4=B8=B4=E6=97=B6=E5=A1=AB?= =?UTF-8?q?=E5=85=850x37=20=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=94=B9=E4=B8=BA5s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/func/func.c | 8 ++++++++ applications/getinfo.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/applications/func/func.c b/applications/func/func.c index 954d346..10563fd 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("位置信息还未准备好。"); 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);//初始化 } From 9d9acb4fdb42a2c604a232bdf3ce4178dc77f924 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Thu, 7 Sep 2023 08:57:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=BF=80=E6=B4=BB?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E5=BB=B6=E6=97=B6=E9=80=BB=E8=BE=91=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=B4=E6=A0=8F=E5=88=A4=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91-=E4=BD=8D=E7=BD=AE=E7=94=A80x37=E5=A1=AB=E5=85=85?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/core.c | 2 ++ applications/func/func.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 10563fd..284de0c 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -789,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;