Fix ble event error

This commit is contained in:
Peter Stockings
2023-01-26 12:26:12 +11:00
parent c507d879e7
commit f8c422db8d

View File

@@ -12,8 +12,8 @@ async function connect(props) {
return char; return char;
} }
function parseCSC({ value }) { function parseCSC(e) {
const flags = value.getUint8(0, true); const flags = e.target.value.getUint8(0, true);
const hasWheel = !!(flags & 0x01); const hasWheel = !!(flags & 0x01);
const hasCrank = !!(flags & 0x02); const hasCrank = !!(flags & 0x02);
let index = 1; let index = 1;