mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Client proxy manage topic update, don't show exchange positons for the connected node
This commit is contained in:
parent
93ac03959b
commit
8a8cd69383
2 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue