From f92738611f03cc4f8713ec21e8b839b2cb90754f Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Thu, 4 Aug 2022 20:23:40 -0700 Subject: [PATCH] Firmware version requirement update --- Meshtastic/Views/Bluetooth/Connect.swift | 2 +- .../Views/Settings/Config/WiFiConfig.swift | 33 ++++++++----------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Meshtastic/Views/Bluetooth/Connect.swift b/Meshtastic/Views/Bluetooth/Connect.swift index 8672b5d7..1e69925e 100644 --- a/Meshtastic/Views/Bluetooth/Connect.swift +++ b/Meshtastic/Views/Bluetooth/Connect.swift @@ -22,7 +22,7 @@ struct Connect: View { @State var isPreferredRadio: Bool = false @State var firmwareVersion = "0.0.0" - @State var minimumVersion = "1.3.28" + @State var minimumVersion = "1.3.30" @State var invalidVersion = false diff --git a/Meshtastic/Views/Settings/Config/WiFiConfig.swift b/Meshtastic/Views/Settings/Config/WiFiConfig.swift index a569f9d3..0e44b935 100644 --- a/Meshtastic/Views/Settings/Config/WiFiConfig.swift +++ b/Meshtastic/Views/Settings/Config/WiFiConfig.swift @@ -30,26 +30,18 @@ struct WiFiConfig: View { VStack { - Text("Enabling WiFi will disable the bluetooth connection to the app.") - .font(.callout) - .padding() - Form { + Text("Enabling WiFi will disable the bluetooth connection to the app.") + .font(.title3) Section(header: Text("Options")) { - - Text("WiFi client mode is enabled by default, if Soft AP is enabled the SSID and psk will be used as the default credentials for the access point.") - .font(.caption) - - //HStack { - Toggle(isOn: $enabled) { + Toggle(isOn: $enabled) { - Label("Enable", systemImage: "wifi") - } - .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - // } + Label("Enable", systemImage: "wifi") + } + .toggleStyle(SwitchToggleStyle(tint: .accentColor)) HStack { Label("SSID", systemImage: "network") @@ -102,7 +94,10 @@ struct WiFiConfig: View { .disableAutocorrection(true) } - Section(header: Text("AP Settings")) { + Section(header: Text("Sofware Access Point")) { + + Text("WiFi uses client mode by default, if Software Access Point(AP) is on the SSID and password will be used to access the AP at meshtastic.local.") + .font(.caption) Toggle(isOn: $apMode) { @@ -114,14 +109,10 @@ struct WiFiConfig: View { Toggle(isOn: $apHidden) { - Label("Hidden AP", systemImage: "eye.slash") + Label("Hidden SSID", systemImage: "eye.slash") } .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - Text("If set the SSID for the AP will be hidden.") - .font(.caption) } - - } } .disabled(!(node != nil && node!.myInfo?.hasWifi ?? false)) @@ -147,6 +138,7 @@ struct WiFiConfig: View { Button("Save WiFI Config to \(bleManager.connectedPeripheral != nil ? bleManager.connectedPeripheral.longName : "Unknown")?") { var wifi = Config.WiFiConfig() + wifi.enabled = self.enabled wifi.ssid = self.ssid wifi.psk = self.password wifi.apMode = self.apMode @@ -179,6 +171,7 @@ struct WiFiConfig: View { self.bleManager.context = context + self.enabled = (node!.wiFiConfig?.enabled ?? false) self.ssid = node!.wiFiConfig?.ssid ?? "" self.password = node!.wiFiConfig?.password ?? "" self.apMode = (node!.wiFiConfig?.apMode ?? false)