From 4fe467f988059a4fb772a2446b0bedbe3fbaf3f2 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 23 Feb 2024 00:33:59 -0800 Subject: [PATCH] Power config view updates --- Meshtastic/Views/Settings/Config/PowerConfig.swift | 14 ++++++-------- en.lproj/Localizable.strings | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Meshtastic/Views/Settings/Config/PowerConfig.swift b/Meshtastic/Views/Settings/Config/PowerConfig.swift index 26d9b872..e76e5f83 100644 --- a/Meshtastic/Views/Settings/Config/PowerConfig.swift +++ b/Meshtastic/Views/Settings/Config/PowerConfig.swift @@ -28,18 +28,17 @@ struct PowerConfig: View { ConfigHeader(title: "Power", config: \.powerConfig, node: node, onAppear: setPowerValues) Section { - Toggle(isOn: $isPowerSaving) { - Label("Power Saving", systemImage: "bolt") - Text("For use when powered from a low-current source in addition to the battery, minimizes power consumption as much as possible even if the deviced appears to be powered.") - + if currentDevice?.architecture == .esp32 || currentDevice?.architecture == .esp32S3 { + Toggle(isOn: $isPowerSaving) { + Label("Power Saving", systemImage: "bolt") + Text("Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. Don't use this setting if you want to use your device with the phone apps.") + } + .toggleStyle(SwitchToggleStyle(tint: .accentColor)) } - .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - Toggle(isOn: $shutdownOnPowerLoss) { Label("power.shutdown.on.power.loss", systemImage: "power") } .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - if shutdownOnPowerLoss { Picker("power.shutdown.after.secs", selection: $shutdownAfterSecs) { ForEach(PowerIntervals.allCases) { at in @@ -52,7 +51,6 @@ struct PowerConfig: View { Text("power") } if currentDevice?.architecture == .esp32 || currentDevice?.architecture == .esp32S3 { - Section { Toggle(isOn: $adcOverride) { Text("power.adc.override") diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings index 5a4fe9a1..a90d8797 100644 --- a/en.lproj/Localizable.strings +++ b/en.lproj/Localizable.strings @@ -239,7 +239,7 @@ "power.config"="Power Config"; "power.ls.secs"="Light Sleep Interval"; "power.min.wake.secs"="Minimum Wake Interval"; -"power.solar"="Solar Powered"; +"power.saving"="Power Saving"; "power.shutdown.on.power.loss"="Shutdown on Power Loss"; "power.shutdown.after.secs"="After"; "power.wait.bluetooth.secs"="Bluetooth Off After";