Fix DevTools warning
This commit is contained in:
+3
-3
@@ -184,7 +184,7 @@ async function writeConfigBlob() {
|
|||||||
view.setUint8(19, 0);
|
view.setUint8(19, 0);
|
||||||
|
|
||||||
try {
|
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');
|
log(`Config written — sens=${config.sensitivity.toFixed(0)} tapThr=${config.tapThreshold} tapAction=${config.tapAction}`,'ok');
|
||||||
} catch(e) { log(`Config write failed: ${e.message}`,'err'); }
|
} catch(e) { log(`Config write failed: ${e.message}`,'err'); }
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ function onTapKeyInput() {
|
|||||||
|
|
||||||
async function sendCalibrate() {
|
async function sendCalibrate() {
|
||||||
if (!chars.command) return;
|
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'); }
|
catch(e) { log(`Calibrate failed: ${e.message}`,'err'); }
|
||||||
}
|
}
|
||||||
function confirmReset() { document.getElementById('overlay').classList.add('show'); }
|
function confirmReset() { document.getElementById('overlay').classList.add('show'); }
|
||||||
@@ -245,7 +245,7 @@ function closeModal() { document.getElementById('overlay').classList.remove('s
|
|||||||
async function doReset() {
|
async function doReset() {
|
||||||
closeModal(); if (!chars.command) return;
|
closeModal(); if (!chars.command) return;
|
||||||
try {
|
try {
|
||||||
await chars.command.writeValue(new Uint8Array([0xFF]));
|
await chars.command.writeValueWithoutResponse(new Uint8Array([0xFF]));
|
||||||
log('Factory reset sent…','warn');
|
log('Factory reset sent…','warn');
|
||||||
setTimeout(async () => { await readConfigBlob(); log('Config reloaded','ok'); }, 1500);
|
setTimeout(async () => { await readConfigBlob(); log('Config reloaded','ok'); }, 1500);
|
||||||
} catch(e) { log(`Reset failed: ${e.message}`,'err'); }
|
} catch(e) { log(`Reset failed: ${e.message}`,'err'); }
|
||||||
|
|||||||
Reference in New Issue
Block a user