Update invalid firmware view

This commit is contained in:
Garth Vander Houwen 2022-11-20 09:50:18 -08:00
parent 0b4eb76eb4
commit 537ad1bf73
2 changed files with 2 additions and 18 deletions

View file

@ -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.")
}
}

View file

@ -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)