diff --git a/MeshtasticApple/Helpers/BLEManager.swift b/MeshtasticApple/Helpers/BLEManager.swift index 61a455a5..f9fdd787 100644 --- a/MeshtasticApple/Helpers/BLEManager.swift +++ b/MeshtasticApple/Helpers/BLEManager.swift @@ -198,7 +198,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } let today = Date() - let visibleDuration = Calendar.current.date(byAdding: .second, value: -2, to: today)! + let visibleDuration = Calendar.current.date(byAdding: .second, value: -4, to: today)! peripherals.removeAll(where: { $0.lastUpdate <= visibleDuration}) } @@ -580,7 +580,6 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph let newMessage = MessageEntity(context: context!) newMessage.messageId = Int64(UInt32.random(in: UInt32(UInt8.max).. MKOverlayRenderer { diff --git a/MeshtasticApple/Views/Nodes/NodeDetail.swift b/MeshtasticApple/Views/Nodes/NodeDetail.swift index aa69dd53..5d7a3699 100644 --- a/MeshtasticApple/Views/Nodes/NodeDetail.swift +++ b/MeshtasticApple/Views/Nodes/NodeDetail.swift @@ -112,7 +112,11 @@ struct NodeDetail: View { isPresented: $isPresentingShutdownConfirm ) { Button("Shutdown Node?", role: .destructive) { - let success = bleManager.sendShutdown(destNum: node.num, wantResponse: false) + + if !bleManager.sendShutdown(destNum: node.num, wantResponse: false) { + + print("Shutdown Failed") + } } } } @@ -139,7 +143,11 @@ struct NodeDetail: View { isPresented: $isPresentingRebootConfirm ) { Button("Reboot Node?", role: .destructive) { - let success = bleManager.sendReboot(destNum: node.num, wantResponse: false) + + if !bleManager.sendReboot(destNum: node.num, wantResponse: false) { + + print("Reboot Failed") + } } } }