From 8f7634f980886318bd4a9954311c4645b81a5ea3 Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Thu, 1 Feb 2024 02:16:59 +0100 Subject: [PATCH 1/3] Add Serial Console Wifi Scan Adding the WiFi Scan feature that was added in the Firmware Version 0.4.0 --- gui/public/i18n/en/translation.ftl | 1 + gui/src/components/settings/pages/Serial.tsx | 10 ++++++++++ .../android/serial/AndroidSerialHandler.kt | 4 ++++ .../protocol/rpc/serial/RPCSerialHandler.java | 16 ++++++++++++++++ .../java/dev/slimevr/serial/SerialHandler.kt | 3 +++ .../desktop/serial/DesktopSerialHandler.kt | 4 ++++ solarxr-protocol | 2 +- 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/gui/public/i18n/en/translation.ftl b/gui/public/i18n/en/translation.ftl index b4c2eae8b4..5f38fba1d1 100644 --- a/gui/public/i18n/en/translation.ftl +++ b/gui/public/i18n/en/translation.ftl @@ -442,6 +442,7 @@ settings-serial-factory_reset-warning-cancel = Cancel settings-serial-get_infos = Get Infos settings-serial-serial_select = Select a serial port settings-serial-auto_dropdown_item = Auto +settings-serial-get_wifi_scan = Get WiFi Scan ## OSC router settings settings-osc-router = OSC router diff --git a/gui/src/components/settings/pages/Serial.tsx b/gui/src/components/settings/pages/Serial.tsx index f267a02974..961fe4b70a 100644 --- a/gui/src/components/settings/pages/Serial.tsx +++ b/gui/src/components/settings/pages/Serial.tsx @@ -12,6 +12,7 @@ import { SerialTrackerGetInfoRequestT, SerialTrackerRebootRequestT, SerialUpdateResponseT, + SerialTrackerGetWifiScanRequestT, } from 'solarxr-protocol'; import { useElemSize, useLayout } from '@/hooks/layout'; import { useWebsocketAPI } from '@/hooks/websocket-api'; @@ -158,6 +159,12 @@ export function Serial() { new SerialTrackerGetInfoRequestT() ); }; + const getWifiScan = () =>{ + sendRPCPacket( + RpcMessage.SerialTrackerGetWifiScanRequest, + new SerialTrackerGetWifiScanRequestT() + ); + }; return ( <> @@ -231,6 +238,9 @@ export function Serial() { + {isMobile && ( Date: Thu, 1 Feb 2024 21:08:40 +0100 Subject: [PATCH 2/3] lint --- gui/src/components/settings/pages/Serial.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/settings/pages/Serial.tsx b/gui/src/components/settings/pages/Serial.tsx index 961fe4b70a..e4be27bfd9 100644 --- a/gui/src/components/settings/pages/Serial.tsx +++ b/gui/src/components/settings/pages/Serial.tsx @@ -159,7 +159,7 @@ export function Serial() { new SerialTrackerGetInfoRequestT() ); }; - const getWifiScan = () =>{ + const getWifiScan = () => { sendRPCPacket( RpcMessage.SerialTrackerGetWifiScanRequest, new SerialTrackerGetWifiScanRequestT() From ce845c2a4c67cca1641bc5e0e22d630c2bca96c1 Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:03:11 +0100 Subject: [PATCH 3/3] Update solarxr-protocol --- solarxr-protocol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solarxr-protocol b/solarxr-protocol index fe78b76f7b..42017052a7 160000 --- a/solarxr-protocol +++ b/solarxr-protocol @@ -1 +1 @@ -Subproject commit fe78b76f7b67931d3997b19a1d87ee9cb2b20c72 +Subproject commit 42017052a74fe01e52c7f303767ad8a2055d171d