Logging for client notification

This commit is contained in:
Garth Vander Houwen 2024-09-23 12:58:22 -07:00
parent 22c27ce27c
commit 60873ec647

View file

@ -652,6 +652,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
retained: decodedInfo.mqttClientProxyMessage.retained
)
mqttManager.mqttClientProxy?.publish(message)
} else if decodedInfo.payloadVariant == FromRadio.OneOf_PayloadVariant.clientNotification(decodedInfo.clientNotification) {
Logger.data.error("⚠️ Client Notification")
}
switch decodedInfo.packet.decoded.portnum {
@ -942,7 +944,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
// Use a RunLoop to prevent the timer from running on the main UI thread
if UserDefaults.provideLocation {
let interval = UserDefaults.provideLocationInterval >= 10 ? UserDefaults.provideLocationInterval : 30
positionTimer = Timer.scheduledTimer(timeInterval: TimeInterval(interval), target: self, selector: #selector(positionTimerFired), userInfo: context, repeats: true)
positionTimer = Timer.scheduledTimer(timeInterval: TimeInterval(3.0), target: self, selector: #selector(positionTimerFired), userInfo: context, repeats: true)
positionTimer = Timer.scheduledTimer(timeInterval: TimeInterval(3.0), target: self, selector: #selector(positionTimerFired), userInfo: context, repeats: true)
if positionTimer != nil {
RunLoop.current.add(positionTimer!, forMode: .common)
}