Client proxy manage topic update, don't show exchange positons for the connected node

This commit is contained in:
Garth Vander Houwen 2024-03-10 15:16:18 -07:00
parent 93ac03959b
commit 8a8cd69383
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ class MqttClientProxyManager {
private static let defaultKeepAliveInterval: Int32 = 60
weak var delegate: MqttClientProxyManagerDelegate?
var mqttClientProxy: CocoaMQTT?
var topic = "msh/2/c"
var topic = "msh/2/e"
var debugLog = false
func connectFromConfigSettings(node: NodeInfoEntity) {
let defaultServerAddress = "mqtt.meshtastic.org"
@ -41,7 +41,7 @@ class MqttClientProxyManager {
let username = node.mqttConfig?.username
let password = node.mqttConfig?.password
let root = node.mqttConfig?.root?.count ?? 0 > 0 ? node.mqttConfig?.root : "msh"
let prefix = root! + "/2/c"
let prefix = root! + "/2/e"
topic = prefix + "/#"
let qos = CocoaMQTTQoS(rawValue: UInt8(1))!
connect(host: host, port: port, useSsl: useSsl, username: username, password: password, topic: topic, qos: qos, cleanSession: true)

View file

@ -89,7 +89,7 @@ struct NodeList: View {
} label: {
Label(node.user!.mute ? "Show Alerts" : "Hide Alerts", systemImage: node.user!.mute ? "bell" : "bell.slash")
}
if bleManager.connectedPeripheral != nil {
if bleManager.connectedPeripheral != nil && node.num != connectedNodeNum {
Button {
let positionSent = bleManager.sendPosition(
channel: node.channel,