232收到数据后检查待发文件功能

缓存默认发两遍
This commit is contained in:
CSSC-WORK\murmur 2023-09-15 09:45:50 +08:00
parent de1a6633af
commit e5e78dbaec
2 changed files with 10 additions and 5 deletions

View File

@ -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();

View File

@ -1205,6 +1205,10 @@ void parse3SData(uint8_t *din, size_t count)
cacheDataToFile(din, count);
}
}
//检查待发文件,相当于失败重发
if (getCntOfFileToSend() && !isInFileMode()) {//不严格
fileIsReady();
}
}