Prevent both is powered and is power saving from both being on

This commit is contained in:
Garth Vander Houwen 2022-06-12 22:14:06 -07:00
parent 07ad4e7a31
commit a3964edb86

View file

@ -29,6 +29,7 @@ struct PowerConfig: View {
Label("Power Saving", systemImage: "powersleep")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
.disabled(isAlwaysPowered)
Text("If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in we should try to minimize power consumption as much as possible.")
.font(.caption)
.listRowSeparator(.visible)
@ -38,6 +39,7 @@ struct PowerConfig: View {
Label("Always Powered", systemImage: "powerplug.fill")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
.disabled(isPowerSaving)
Text("Circumvents the logic block for determining whether the device is powered or not. Useful for devices with finicky ADC issues on the battery sense pins, or no battery pin at all.")
.font(.caption)
.listRowSeparator(.visible)