mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
MQTT interval default, remove orphaned code
This commit is contained in:
parent
b962c68ac2
commit
9ecfe6a3e7
2 changed files with 7 additions and 46 deletions
|
|
@ -112,7 +112,6 @@ struct MQTTConfig: View {
|
|||
Label("I have read and understand the above. I voluntarily consent to the unencrypted transmission of my node data via MQTT.", systemImage: "hand.raised")
|
||||
.foregroundColor(.gray)
|
||||
.font(.callout)
|
||||
|
||||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
}
|
||||
|
|
@ -429,8 +428,13 @@ struct MQTTConfig: View {
|
|||
self.tlsEnabled = node?.mqttConfig?.tlsEnabled ?? false
|
||||
self.mqttConnected = bleManager.mqttProxyConnected
|
||||
self.mapReportingEnabled = node?.mqttConfig?.mapReportingEnabled ?? false
|
||||
self.mapPublishIntervalSecs = Int(node?.mqttConfig?.mapPublishIntervalSecs ?? 3600)
|
||||
if node?.mqttConfig?.mapPublishIntervalSecs ?? 0 < 3600 {
|
||||
self.mapPublishIntervalSecs = 3600
|
||||
} else {
|
||||
self.mapPublishIntervalSecs = Int(node?.mqttConfig?.mapPublishIntervalSecs ?? 3600)
|
||||
}
|
||||
self.mapPositionPrecision = Double(node?.mqttConfig?.mapPositionPrecision ?? 14)
|
||||
self.mapReportingOptIn = UserDefaults.mapReportingOptIn
|
||||
if mapPositionPrecision < 11 || mapPositionPrecision > 14 {
|
||||
self.mapPositionPrecision = 14
|
||||
self.hasChanges = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue