From e5e78dbaec2eb9582e9975b3e11aa8e7465152f2 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Fri, 15 Sep 2023 09:45:50 +0800 Subject: [PATCH] =?UTF-8?q?232=E6=94=B6=E5=88=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8E=E6=A3=80=E6=9F=A5=E5=BE=85=E5=8F=91=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20=E7=BC=93=E5=AD=98=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8F=91=E4=B8=A4=E9=81=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/core.c | 11 ++++++----- applications/func/func.c | 4 ++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/applications/core.c b/applications/core.c index 2e65c95..5e67777 100644 --- a/applications/core.c +++ b/applications/core.c @@ -41,10 +41,10 @@ static rt_thread_t deinitThread=RT_NULL; static rt_timer_t tmrToPNTT=RT_NULL; static uint8_t isWindowMode=0;//RTC引起TT开机 static uint8_t isFileMode=0;//file is ok -//void TTisReady(void) -//{ -// rt_sem_release(TTReady); -//} +uint8_t isInFileMode(void) +{ + return isFileMode; +} SYS_CFG scfg={ .sendInterval =60, @@ -558,7 +558,7 @@ void getAndSendFile() static int index[MAX_KEY_LEN]; char f[cnt][MAX_KEY_LEN]; getFilesToSend(f, index); - + for (int var = 0; var < 2; ++var) { for (int i = cnt-1; i > -1; i--)//倒序发送 { LOG_D("f[%d]=%s",i,f[i]); @@ -569,6 +569,7 @@ void getAndSendFile() upSendFile(f[i],index[i]); } } + } //发送完毕 LOG_D("mission done."); resetTM(); diff --git a/applications/func/func.c b/applications/func/func.c index a66ad3b..16c7657 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -1205,6 +1205,10 @@ void parse3SData(uint8_t *din, size_t count) cacheDataToFile(din, count); } } + //检查待发文件,相当于失败重发 + if (getCntOfFileToSend() && !isInFileMode()) {//不严格 + fileIsReady(); + } }