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(); + } }