From 20605db7f8df6b521d39420a4ee89c6fbf480d4b Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Sun, 5 Nov 2023 10:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8C=85=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/func/func.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/func/func.c b/applications/func/func.c index 8faba88..c78edde 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -199,10 +199,10 @@ void upSend_thread_entry(void* parameter) cfg.fallpiece[0] = msg->len/PACK_SIZE+1; #ifdef CRYPT_BEFRE_PACK //crypt before pack - //更改后3S单帧数据由160升为240,超出TT最大单包数据容量,须分包 + //更改后3S单帧数据升为200+,超出TT最大单包数据容量,须分包 for (size_t var = 0; var < msg->len; var=var+PACK_SIZE) { - cfg.fcurpiece[0] = var+1; + cfg.fcurpiece[0] = var/PACK_SIZE+1; uint8_t tmp[200]; uint8_t len = cryptSingleMsg(msg->data+var, (msg->len-var)>PACK_SIZE?PACK_SIZE:(msg->len-var), tmp); @@ -221,6 +221,7 @@ void upSend_thread_entry(void* parameter) { LOG_E("send error, try to cache %d bytes data to file.",msg->len); cacheDataToFile(msg->data, msg->len); + break; } } }