feat(ble): 完善BLE OTA架构并优化性能

- 实现BLE OTA数据路径分离:添加ble_ota_data.cpp处理重排序/工作线程/DATA_IN,
  和ble_ota_host.cpp处理GATT/GAP/广播/主机功能
- 将滑动ACK窗口从32增大到64,实测Windows WebBT环境下固件传输速度提升约10%
  (从40KB/s提升到44KB/s),内存消耗约30KB重排序缓冲区
- 优化调试日志级别,将OTA相关信息从INFO调整为DBG以减少日志冗余

refactor(can): 改进CAN反馈监听机制

- 将CAN反馈任务从1Hz主动轮询模式改为被动事件监听模式,
  使用SpiMaster::takeEvent()替代主动发送0xC1轮询请求
- 更新相关头文件注释说明架构变更,将"周期性轮询"改为"被动接收推送"
- 修改调试日志级别,将暂停/恢复状态日志从INFO调整为DBG
This commit is contained in:
小龙虾
2026-07-18 01:16:06 +08:00
parent 1b10f89d8c
commit b807645a20
47 changed files with 4361 additions and 2890 deletions
+16
View File
@@ -42,3 +42,19 @@ export function escapeHtml(text) {
.replace(/"/g, '"')
.replace(/'/g, ''');
}
/**
* @description 将字节数组(Uint8Array 或 ArrayBuffer)转为小写 hex 字符串。
* SHA-256 等哈希显示前需要 toUpperCase()。
* @param {Uint8Array|ArrayBuffer} bytes
* @returns {string}
*/
export function bytesToHex(bytes) {
var arr = bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
var out = '';
for (var i = 0; i < arr.length; i++) {
var h = arr[i].toString(16);
if (h.length < 2) h = '0' + h;
out += h;
}
return out;
}