1、新增Dengle定时参数下发功能,支持最多10条配置,断电保存到Flash,COM打开时暂停发送、关闭后恢复
2、新增USB查询产品码(0x66)和查询Dengle配置(0x74)命令 3、修复bleproto组包栈溢出导致设置Dengle后复位的问题,并完善CDC的DTR状态判断
This commit is contained in:
@@ -714,6 +714,45 @@ void usr_app_ota_init()
|
||||
}
|
||||
}
|
||||
|
||||
// void usr_test_bleproto_runcmd(void)
|
||||
// {
|
||||
// bleproto_appdata_desc_t encode_desc = {0};
|
||||
// encode_desc.header.version = 0;
|
||||
// encode_desc.header.datafmt = BLEPROTO_APPDATA_DATAFMT_JSON;
|
||||
// encode_desc.header.msgtype = BLEPROTO_APPDATA_MSGTYPE_REQ;
|
||||
// encode_desc.header.msgid = 1;
|
||||
// encode_desc.header.encrypt = 0;
|
||||
// encode_desc.header.serviceid = E_BLEPROTO_SERVICE_ID_REPORTCMD;
|
||||
|
||||
// bleproto_reportcmd_req_t *pkt = &encode_desc.datast.reportcmd_req;
|
||||
// /*
|
||||
// > 告警上报 (*设备主动上报*)
|
||||
// * 命令ID: 120
|
||||
// * 参数说明
|
||||
|
||||
// | 索引 | 类型 | 描述 | 取值 |
|
||||
// | ---- | ----- | ---------- | ----------------------------------------------------- |
|
||||
// | 0 | int32 | 告警事件id | 5000:硬件故障;5001:低电量报警; 5010:震动开机报警 |
|
||||
// | 1 | int32 | UTC时间戳 | 事件触发UTCS时间戳单位秒 |
|
||||
|
||||
// */
|
||||
// req->ycmd.cmd_id = 100;
|
||||
|
||||
// req->ycmd.arg_int32[0] = 5001; // 电量上报
|
||||
// req->ycmd.arg_int32[1] = usr_var.usr_cureent_utc; // UTC时间戳
|
||||
|
||||
// req->ycmd.arg_int32_count = 2;
|
||||
// req->ycmd.t = usr_var.usr_cureent_utc;
|
||||
|
||||
// int elen = bleproto_appdata_encode(txbuf, sizeof(txbuf), sizeof(txbuf), &encode_desc);
|
||||
// printf("encode_len = %d\n", elen);
|
||||
// if (elen > 0)
|
||||
// {
|
||||
// usr_ble_send_data(txbuf, elen);
|
||||
// printf_buf(txbuf, elen);
|
||||
// }
|
||||
// }
|
||||
|
||||
void usr_test_protocol(void)
|
||||
{
|
||||
bleproto_appdata_desc_t encode_desc = {0};
|
||||
|
||||
Reference in New Issue
Block a user