mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Bug fixes
This commit is contained in:
parent
fda42ecc15
commit
9511ee76f3
4 changed files with 11 additions and 7 deletions
|
|
@ -456,7 +456,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, ObservableObject {
|
|||
}
|
||||
}
|
||||
// NodeInfo
|
||||
if decodedInfo.nodeInfo.num != 0 && !invalidVersion {
|
||||
if decodedInfo.nodeInfo.num > 0 && !invalidVersion {
|
||||
|
||||
nowKnown = true
|
||||
let nodeInfo = nodeInfoPacket(nodeInfo: decodedInfo.nodeInfo, channel: decodedInfo.packet.channel, context: context!)
|
||||
|
|
|
|||
|
|
@ -230,6 +230,8 @@ func nodeInfoPacket (nodeInfo: NodeInfo, channel: UInt32, context: NSManagedObje
|
|||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.nodeinfo.received %@", comment: "Node info received for: %@"), String(nodeInfo.num))
|
||||
MeshLogger.log("📟 \(logString)")
|
||||
|
||||
guard (nodeInfo.num > 0) else { return nil }
|
||||
|
||||
let fetchNodeInfoRequest: NSFetchRequest<NSFetchRequestResult> = NSFetchRequest.init(entityName: "NodeInfoEntity")
|
||||
fetchNodeInfoRequest.predicate = NSPredicate(format: "num == %lld", Int64(nodeInfo.num))
|
||||
|
||||
|
|
@ -384,6 +386,8 @@ func nodeInfoAppPacket (packet: MeshPacket, context: NSManagedObjectContext) {
|
|||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.nodeinfo.received %@", comment: "Node info received for: %@"), String(packet.from))
|
||||
MeshLogger.log("📟 \(logString)")
|
||||
|
||||
guard (packet.from > 0) else { return }
|
||||
|
||||
let fetchNodeInfoAppRequest: NSFetchRequest<NSFetchRequestResult> = NSFetchRequest.init(entityName: "NodeInfoEntity")
|
||||
fetchNodeInfoAppRequest.predicate = NSPredicate(format: "num == %lld", Int64(packet.from))
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
leftIcon.backgroundColor = UIColor(.accentColor)
|
||||
annotationView.leftCalloutAccessoryView = leftIcon
|
||||
let subtitle = UILabel()
|
||||
if subtitle.text?.count ?? 0 > 0 {
|
||||
if waypointAnnotation.longDescription?.count ?? 0 > 0 {
|
||||
subtitle.text = (waypointAnnotation.longDescription ?? "") + "\n"
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -273,11 +273,11 @@ struct WaypointFormView: View {
|
|||
longitude = coordinate.longitude
|
||||
}
|
||||
|
||||
// if coordinate.distance(from: LocationHelper.DefaultLocation) == 0.0 {
|
||||
// // Too close to apple park, bail out
|
||||
// waypointId = 0
|
||||
// dismiss()
|
||||
// }
|
||||
if coordinate.distance(from: LocationHelper.DefaultLocation) == 0.0 {
|
||||
// Too close to apple park, bail out
|
||||
waypointId = 0
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue