- 添加了upload-esp32.js用于处理ESP32的OTA上传,包括文件上传、SHA-256验证和设备重启。 - 引入了upload-gd32.js,用于触发GD32 OTA中继并跟踪中继进度。 - 针对OTA流程,增强了会话管理和错误处理能力。 - 通过在上传过程中显示吐司通知和进度更新,改进了用户反馈。
27 lines
965 B
JavaScript
27 lines
965 B
JavaScript
// ==================== BLE OTA SHA-256 校验展示 ====================
|
|
|
|
export function showBleVerifyInfo(frontSha, devSha, result) {
|
|
var panel = document.getElementById('stageVerifyInfo');
|
|
if (panel) { panel.className = 'stage-verify-info'; panel.style.display = 'block'; }
|
|
if (frontSha !== undefined) {
|
|
var el = document.getElementById('sviFrontSha');
|
|
if (el) el.textContent = frontSha || '-';
|
|
}
|
|
if (devSha !== undefined) {
|
|
var el = document.getElementById('sviDeviceSha');
|
|
if (el) el.textContent = devSha || '-';
|
|
}
|
|
if (result !== undefined) {
|
|
var el = document.getElementById('sviResult');
|
|
if (el) {
|
|
el.textContent = result.text || '-';
|
|
el.className = 'svi-val' + (result.ok ? ' ok' : result.err ? ' err' : '');
|
|
}
|
|
}
|
|
}
|
|
|
|
export function hideBleVerifyInfo() {
|
|
var panel = document.getElementById('stageVerifyInfo');
|
|
if (panel) { panel.className = 'stage-verify-info'; panel.style.display = 'none'; }
|
|
}
|