From 15f9cf693bcdf33a42724e46a12d570fed0fa550 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Wed, 13 Sep 2023 14:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DsendFile=E7=9A=84bug=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E5=8A=A8=E5=BC=80=E7=AA=97=E6=A8=A1?= =?UTF-8?q?=E5=BC=8Falarm=E4=B8=8D=E5=85=B3=E9=97=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/core.c | 9 +++++---- applications/func/func.c | 1 + applications/main.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/applications/core.c b/applications/core.c index d68bd87..5d98d9e 100644 --- a/applications/core.c +++ b/applications/core.c @@ -442,7 +442,8 @@ static void upSendFile_thread_entry(void *parameter) } 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++) { LOG_HEX("msg",27,d[i],s[i]); } @@ -509,7 +510,7 @@ void d_upSendFile(int argc, char **argv) */ void getAndSendFile() { - resetTM(); +// resetTM(); isFileMode=0;//逻辑不是很准确 //优先发送未达指定大小的文件 char fnow[50]; @@ -561,7 +562,7 @@ static void chkAndSendFile_thread_entry() { // int e; 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满足 { LOG_I("等待TT就绪"); @@ -607,7 +608,7 @@ static void chkAndSendFile_thread_entry() break; } } - LOG_W("--------one mission DONE--------"); +// LOG_W("--------one mission DONE--------"); } } diff --git a/applications/func/func.c b/applications/func/func.c index 0de85e3..a66ad3b 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -425,6 +425,7 @@ void checkManualWindow(void) } if (rst == 0) {//manual open without auto close + stopAlarm(); return; } //设置定时器,定时器到则关窗 diff --git a/applications/main.c b/applications/main.c index bec77cd..2553c4e 100644 --- a/applications/main.c +++ b/applications/main.c @@ -86,7 +86,7 @@ void show_version(void) char str[30]; uint8_t t[10]; 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,显示版本号);