Bump version, fix mqtt port bug, make connected node details smaller on all the settings views, clean up text on position config view

This commit is contained in:
Garth Vander Houwen 2024-02-19 21:39:53 -08:00
parent 07c40e755c
commit 52af088d8c
18 changed files with 12 additions and 27 deletions

View file

@ -1545,7 +1545,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.23;
MARKETING_VERSION = 2.2.24;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
@ -1579,7 +1579,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.23;
MARKETING_VERSION = 2.2.24;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
@ -1701,7 +1701,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.23;
MARKETING_VERSION = 2.2.24;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1734,7 +1734,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.2.23;
MARKETING_VERSION = 2.2.24;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View file

@ -31,8 +31,10 @@ class MqttClientProxyManager {
if host == nil || host!.isEmpty {
host = defaultServerAddress
} else if host != nil && host!.contains(":") {
host = host!.components(separatedBy: ":")[0]
defaultServerPort = Int(host!.components(separatedBy: ":")[1])!
if let fullHost = host {
host = fullHost.components(separatedBy: ":")[0]
defaultServerPort = Int(fullHost.components(separatedBy: ":")[1]) ?? 1883
}
}
if let host = host {
let port = defaultServerPort

View file

@ -46,7 +46,6 @@ struct BluetoothConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? -1 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -51,7 +51,6 @@ struct DeviceConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -51,7 +51,6 @@ struct DisplayConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -75,7 +75,6 @@ struct LoRaConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -47,7 +47,6 @@ struct AmbientLightingConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -58,7 +58,6 @@ struct CannedMessagesConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -63,7 +63,6 @@ struct DetectionSensorConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -55,7 +55,6 @@ struct ExternalNotificationConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -59,7 +59,6 @@ struct MQTTConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -43,7 +43,6 @@ struct RangeTestConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -41,7 +41,6 @@ struct RtttlConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -51,7 +51,6 @@ struct SerialConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -51,7 +51,6 @@ struct StoreForwardConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -45,7 +45,6 @@ struct TelemetryConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -49,7 +49,6 @@ struct NetworkConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)

View file

@ -97,7 +97,6 @@ struct PositionConfig: View {
}
} else if node != nil && node?.num ?? 0 == bleManager.connectedPeripheral?.num ?? 0 {
Text("Configuration for: \(node?.user?.longName ?? "Unknown")")
.font(.title3)
} else {
Text("Please connect to a radio to configure settings.")
.font(.callout)
@ -106,7 +105,7 @@ struct PositionConfig: View {
Section(header: Text("Position Packet")) {
Picker("Position Broadcast Interval", selection: $positionBroadcastSeconds) {
Picker("Interval", selection: $positionBroadcastSeconds) {
ForEach(UpdateIntervals.allCases) { at in
if at.rawValue >= 900 {
Text(at.description)
@ -114,11 +113,10 @@ struct PositionConfig: View {
}
}
.pickerStyle(DefaultPickerStyle())
Text("The maximum interval that can elapse without a node sending a position")
Text("The maximum interval that can elapse without a node broadcasting a position")
.font(.caption)
Toggle(isOn: $smartPositionEnabled) {
Label("Smart Position Broadcast", systemImage: "location.fill.viewfinder")
Label("Smart Position", systemImage: "location.fill.viewfinder")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
if smartPositionEnabled {
@ -171,7 +169,7 @@ struct PositionConfig: View {
Label("Fixed Position", systemImage: "location.square.fill")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
Text("If enabled your current phone location will be sent to the device and will broadcast over the mesh on the position interval. Fixed positon will always use the most recent position the device has.")
Text("If enabled your current phone location will be sent to the device and will broadcast over the mesh on the position interval. Fixed position will always use the most recent position the device has.")
.font(.caption)
}
}