From f7ba8ad967d8a4d91b9984944839fcc01bd01c40 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 17 Dec 2023 12:58:14 +1000 Subject: [PATCH] minor fixes --- src/components/PageComponents/Connect/BLE.tsx | 12 +-- .../PageComponents/Connect/HTTP.tsx | 10 +-- .../PageComponents/Connect/Serial.tsx | 14 +-- .../PageComponents/Messages/MessageInput.tsx | 2 +- src/core/hooks/useToast.ts | 13 +-- src/core/stores/appStore.ts | 6 +- src/core/stores/deviceStore.ts | 85 ++++++++++++------- src/core/subscriptions.ts | 11 +-- src/core/utils/bitwise.ts | 4 +- src/index.tsx | 1 - src/pages/Config/DeviceConfig.tsx | 1 - src/pages/Dashboard/index.tsx | 4 +- src/pages/Map.tsx | 28 +++--- src/pages/Messages.tsx | 10 +-- 14 files changed, 112 insertions(+), 89 deletions(-) diff --git a/src/components/PageComponents/Connect/BLE.tsx b/src/components/PageComponents/Connect/BLE.tsx index 0ed24dc9..6c261319 100644 --- a/src/components/PageComponents/Connect/BLE.tsx +++ b/src/components/PageComponents/Connect/BLE.tsx @@ -17,16 +17,16 @@ export const BLE = (): JSX.Element => { }, []); useEffect(() => { - void updateBleDeviceList(); + updateBleDeviceList(); }, [updateBleDeviceList]); - const onConnect = async (BLEDevice: BluetoothDevice) => { + const onConnect = async (bleDevice: BluetoothDevice) => { const id = randId(); const device = addDevice(id); setSelectedDevice(id); const connection = new IBLEConnection(id); await connection.connect({ - device: BLEDevice, + device: bleDevice, }); device.addConnection(connection); subscribeAll(device, connection); @@ -39,7 +39,7 @@ export const BLE = (): JSX.Element => {