From f8c422db8dd067b44435110d160a27d79e7d4e98 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Thu, 26 Jan 2023 12:26:12 +1100 Subject: [PATCH] Fix ble event error --- static/js/BLE.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/BLE.js b/static/js/BLE.js index dda6be5..c73c104 100644 --- a/static/js/BLE.js +++ b/static/js/BLE.js @@ -12,8 +12,8 @@ async function connect(props) { return char; } -function parseCSC({ value }) { - const flags = value.getUint8(0, true); +function parseCSC(e) { + const flags = e.target.value.getUint8(0, true); const hasWheel = !!(flags & 0x01); const hasCrank = !!(flags & 0x02); let index = 1;