From 537ad1bf738123bc92c59a0185b0c4b1b730dcae Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 20 Nov 2022 09:50:18 -0800 Subject: [PATCH] Update invalid firmware view --- Meshtastic/Helpers/MeshPackets.swift | 8 +------- Meshtastic/Views/Bluetooth/InvalidVersion.swift | 12 +----------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Meshtastic/Helpers/MeshPackets.swift b/Meshtastic/Helpers/MeshPackets.swift index 03c41d4b..d80efb15 100644 --- a/Meshtastic/Helpers/MeshPackets.swift +++ b/Meshtastic/Helpers/MeshPackets.swift @@ -1056,12 +1056,9 @@ func positionPacket (packet: MeshPacket, context: NSManagedObjectContext) { do { if let positionMessage = try? Position(serializedData: packet.decoded.payload) { - // Don't save empty position packets if positionMessage.longitudeI > 0 || positionMessage.latitudeI > 0 { - let fetchedNode = try context.fetch(fetchNodePositionRequest) as! [NodeInfoEntity] - if fetchedNode.count == 1 { let position = PositionEntity(context: context) @@ -1103,13 +1100,10 @@ func positionPacket (packet: MeshPacket, context: NSManagedObjectContext) { } else { print("💥 Empty POSITION_APP Packet") print(try! packet.jsonString()) - if let dataMessage = try? DataMessage(serializedData: packet.decoded.payload) { - //print(dataMessage) - } } } } catch { - print("💥 Error Fetching NodeInfoEntity for POSITION_APP") + print("💥 Error Deserializing POSITION_APP packet.") } } diff --git a/Meshtastic/Views/Bluetooth/InvalidVersion.swift b/Meshtastic/Views/Bluetooth/InvalidVersion.swift index 92868cca..5f19887a 100644 --- a/Meshtastic/Views/Bluetooth/InvalidVersion.swift +++ b/Meshtastic/Views/Bluetooth/InvalidVersion.swift @@ -17,27 +17,21 @@ struct InvalidVersion: View { VStack { - Text("Update your firmware") + Text("Firmware Update Required") .font(.largeTitle) .foregroundColor(.orange) Divider() - VStack { - - Text("The Meshtastic Apple apps support firmware version \(minimumVersion) and above.") .font(.title2) .padding(.bottom) - Link("Firmware update docs", destination: URL(string: "https://meshtastic.org/docs/getting-started/flashing-firmware/")!) .font(.title) .padding() - Link("Additional help", destination: URL(string: "https://meshtastic.org/docs/faq")!) .font(.title) .padding() - } .padding() @@ -55,10 +49,6 @@ struct InvalidVersion: View { .font(.callout) .padding([.leading, .trailing, .bottom]) - Text("There is a build for 1.2 EOL under Other Versions in TestFlight that will be available until the end of November 2022.") - .font(.callout) - .padding([.leading, .trailing, .bottom]) - Link("Version 1.2 End of life (EOL) Info", destination: URL(string: "https://meshtastic.org/docs/1.2-End-of-life/")!) .font(.callout)