Fix DevTools warning

This commit is contained in:
2026-03-01 20:57:36 +01:00
parent 9ca311cf63
commit 91d802a52e

View File

@@ -184,7 +184,7 @@ async function writeConfigBlob() {
view.setUint8(19, 0);
try {
await chars.configBlob.writeValue(buf);
await chars.configBlob.writeValueWithResponse(buf);
log(`Config written — sens=${config.sensitivity.toFixed(0)} tapThr=${config.tapThreshold} tapAction=${config.tapAction}`,'ok');
} catch(e) { log(`Config write failed: ${e.message}`,'err'); }
}
@@ -237,7 +237,7 @@ function onTapKeyInput() {
async function sendCalibrate() {
if (!chars.command) return;
try { await chars.command.writeValue(new Uint8Array([0x01])); log('Calibration sent — hold still!','warn'); }
try { await chars.command.writeValueWithoutResponse(new Uint8Array([0x01])); log('Calibration sent — hold still!','warn'); }
catch(e) { log(`Calibrate failed: ${e.message}`,'err'); }
}
function confirmReset() { document.getElementById('overlay').classList.add('show'); }
@@ -245,7 +245,7 @@ function closeModal() { document.getElementById('overlay').classList.remove('s
async function doReset() {
closeModal(); if (!chars.command) return;
try {
await chars.command.writeValue(new Uint8Array([0xFF]));
await chars.command.writeValueWithoutResponse(new Uint8Array([0xFF]));
log('Factory reset sent…','warn');
setTimeout(async () => { await readConfigBlob(); log('Config reloaded','ok'); }, 1500);
} catch(e) { log(`Reset failed: ${e.message}`,'err'); }