修复sendFile的bug

修复手动开窗模式alarm不关闭的bug
This commit is contained in:
CSSC-WORK\murmur 2023-09-13 14:31:48 +08:00
parent ec50a45884
commit 15f9cf693b
3 changed files with 7 additions and 5 deletions

View File

@ -442,7 +442,8 @@ static void upSendFile_thread_entry(void *parameter)
} }
LOG_D("ready to send '%s---%d'",f->fname,f->index); LOG_D("ready to send '%s---%d'",f->fname,f->index);
rt_uint8_t len = pack_File(f->fname, 0, d, s); static rt_uint8_t len =0;
len = pack_File(f->fname, 0, d, s);
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
LOG_HEX("msg",27,d[i],s[i]); LOG_HEX("msg",27,d[i],s[i]);
} }
@ -509,7 +510,7 @@ void d_upSendFile(int argc, char **argv)
*/ */
void getAndSendFile() void getAndSendFile()
{ {
resetTM(); // resetTM();
isFileMode=0;//逻辑不是很准确 isFileMode=0;//逻辑不是很准确
//优先发送未达指定大小的文件 //优先发送未达指定大小的文件
char fnow[50]; char fnow[50];
@ -561,7 +562,7 @@ static void chkAndSendFile_thread_entry()
{ {
// int e; // int e;
LOG_I("ready and waiting",scfg.sendInterval); LOG_I("ready and waiting",scfg.sendInterval);
if (rt_event_recv(&chkSta, FILE_IS_OK | TIMER_IS_OUT, RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR, if (!isTCPok() || rt_event_recv(&chkSta, FILE_IS_OK | TIMER_IS_OUT, RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR,
RT_WAITING_FOREVER, RT_NULL) == RT_EOK) //条件1满足 RT_WAITING_FOREVER, RT_NULL) == RT_EOK) //条件1满足
{ {
LOG_I("等待TT就绪"); LOG_I("等待TT就绪");
@ -607,7 +608,7 @@ static void chkAndSendFile_thread_entry()
break; break;
} }
} }
LOG_W("--------one mission DONE--------"); // LOG_W("--------one mission DONE--------");
} }
} }

View File

@ -425,6 +425,7 @@ void checkManualWindow(void)
} }
if (rst == 0) {//manual open without auto close if (rst == 0) {//manual open without auto close
stopAlarm();
return; return;
} }
//设置定时器,定时器到则关窗 //设置定时器,定时器到则关窗

View File

@ -86,7 +86,7 @@ void show_version(void)
char str[30]; char str[30];
uint8_t t[10]; uint8_t t[10];
size_t len=time2Byte(t); size_t len=time2Byte(t);
rt_kprintf("SW Version: %s, build-%s\n","2.34d",bytes2str(t, 3, 10, "", str)); rt_kprintf("SW Version: %s, build-%s\n","2.41d",bytes2str(t, 3, 10, "", str));
} }
MSH_CMD_EXPORT(show_version,); MSH_CMD_EXPORT(show_version,);