From 39508ec71faf3932318c8aedc800cb100c58faee Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Wed, 20 Sep 2023 09:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E4=BD=8D=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=B6=E5=90=8C=E6=97=B6=E4=B8=8A=E6=8A=A5=E7=94=B5?= =?UTF-8?q?=E6=B1=A0RAW=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/func/func.c | 19 ++++++++++--------- applications/main.c | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/applications/func/func.c b/applications/func/func.c index 68a8416..bfb20c6 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -683,7 +683,7 @@ void reportSysCfg() * @param dout 存储位置信息的数组 * @return 数组大小 */ -#define _LOC_CNT 10 +#define _LOC_CNT 8 static int packLocMsg(uint8_t *dout) { uint8_t alertMsg[200] = @@ -699,9 +699,10 @@ static int packLocMsg(uint8_t *dout) len += rst; //add battery info - uint8_t temp[60]; - rst = getBattInfo(temp); - memcpy(alertMsg+8+len,temp,rst); +// uint8_t temp[60]; +// rst = getBattInfo(temp); +// memcpy(alertMsg+8+len,temp,rst); + rst = getBattRAWInfo(alertMsg+8+len); len += rst; alertMsg[7] = len; //update len of raw data @@ -715,12 +716,12 @@ static int packLocMsg(uint8_t *dout) } static void d_packLocMsg(void) { -// uint8_t tmp[200]; -// size_t len = packLocMsg(tmp); + uint8_t tmp[200]; + size_t len = packLocMsg(tmp); // len = cryptSingleMsg(tmp, len, tmp); - uint8_t din[]={0x5A,0xA5,0x3E,0x32,0x06,0x08,0x00,0x0A,0x17,0x09,0x05,0x0F,0x24,0x0B,0xFF,0xFF,0xFF,0xFF,0x33,0xED}; - reportDepth(din, sizeof(din)); -// LOG_HEX("c",16,tmp,len); +// uint8_t din[]={0x5A,0xA5,0x3E,0x32,0x06,0x08,0x00,0x0A,0x17,0x09,0x05,0x0F,0x24,0x0B,0xFF,0xFF,0xFF,0xFF,0x33,0xED}; +// reportDepth(din, sizeof(din)); + LOG_HEX("c",16,tmp,len); // upSend(tmp, len); } /** diff --git a/applications/main.c b/applications/main.c index 02df6d4..f94e1a8 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.51d",bytes2str(t, 3, 10, "", str)); + rt_kprintf("SW Version: %s, build-%s\n","2.52d",bytes2str(t, 3, 10, "", str)); } MSH_CMD_EXPORT(show_version,显示版本号);