上报位置信息时同时上报电池RAW信息
This commit is contained in:
parent
874a3dacb5
commit
39508ec71f
@ -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);
|
||||
}
|
||||
/**
|
||||
|
@ -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,显示版本号);
|
||||
|
Loading…
Reference in New Issue
Block a user