上报位置信息时同时上报电池RAW信息
This commit is contained in:
parent
874a3dacb5
commit
39508ec71f
@ -683,7 +683,7 @@ void reportSysCfg()
|
|||||||
* @param dout 存储位置信息的数组
|
* @param dout 存储位置信息的数组
|
||||||
* @return 数组大小
|
* @return 数组大小
|
||||||
*/
|
*/
|
||||||
#define _LOC_CNT 10
|
#define _LOC_CNT 8
|
||||||
static int packLocMsg(uint8_t *dout)
|
static int packLocMsg(uint8_t *dout)
|
||||||
{
|
{
|
||||||
uint8_t alertMsg[200] =
|
uint8_t alertMsg[200] =
|
||||||
@ -699,9 +699,10 @@ static int packLocMsg(uint8_t *dout)
|
|||||||
len += rst;
|
len += rst;
|
||||||
|
|
||||||
//add battery info
|
//add battery info
|
||||||
uint8_t temp[60];
|
// uint8_t temp[60];
|
||||||
rst = getBattInfo(temp);
|
// rst = getBattInfo(temp);
|
||||||
memcpy(alertMsg+8+len,temp,rst);
|
// memcpy(alertMsg+8+len,temp,rst);
|
||||||
|
rst = getBattRAWInfo(alertMsg+8+len);
|
||||||
len += rst;
|
len += rst;
|
||||||
|
|
||||||
alertMsg[7] = len; //update len of raw data
|
alertMsg[7] = len; //update len of raw data
|
||||||
@ -715,12 +716,12 @@ static int packLocMsg(uint8_t *dout)
|
|||||||
}
|
}
|
||||||
static void d_packLocMsg(void)
|
static void d_packLocMsg(void)
|
||||||
{
|
{
|
||||||
// uint8_t tmp[200];
|
uint8_t tmp[200];
|
||||||
// size_t len = packLocMsg(tmp);
|
size_t len = packLocMsg(tmp);
|
||||||
// len = cryptSingleMsg(tmp, len, 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};
|
// 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));
|
// reportDepth(din, sizeof(din));
|
||||||
// LOG_HEX("c",16,tmp,len);
|
LOG_HEX("c",16,tmp,len);
|
||||||
// upSend(tmp, len);
|
// upSend(tmp, len);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -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.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,显示版本号);
|
MSH_CMD_EXPORT(show_version,显示版本号);
|
||||||
|
Loading…
Reference in New Issue
Block a user