mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #90 from meshtastic/hotfix/peripheral_scanning_bug
Hotfix/peripheral scanning bug
This commit is contained in:
commit
cf978eb47d
5 changed files with 20 additions and 17 deletions
|
|
@ -809,7 +809,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.18;
|
||||
MARKETING_VERSION = 1.3.19;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
|
@ -840,7 +840,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.18;
|
||||
MARKETING_VERSION = 1.3.19;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
|
|
|||
|
|
@ -580,7 +580,6 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
|
||||
let newMessage = MessageEntity(context: context!)
|
||||
newMessage.messageId = Int64(UInt32.random(in: UInt32(UInt8.max)..<UInt32.max))
|
||||
//newMessage.messageId = Int64(0xFF | UInt32.random(in: UInt32(UInt8.max)..<UInt32(1147483647)))
|
||||
newMessage.messageTimestamp = Int32(Date().timeIntervalSince1970)
|
||||
newMessage.receivedACK = false
|
||||
newMessage.direction = "IN"
|
||||
|
|
@ -745,7 +744,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
meshPacket.from = 0 //UInt32(connectedPeripheral.num)
|
||||
meshPacket.id = UInt32.random(in: UInt32(UInt8.max)..<UInt32.max)
|
||||
meshPacket.priority = MeshPacket.Priority.reliable
|
||||
meshPacket.wantAck = false
|
||||
meshPacket.wantAck = wantResponse
|
||||
|
||||
meshPacket.hopLimit = 0
|
||||
|
||||
var dataMessage = DataMessage()
|
||||
|
|
@ -780,7 +780,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
meshPacket.from = 0 //UInt32(connectedPeripheral.num)
|
||||
meshPacket.id = UInt32.random(in: UInt32(UInt8.max)..<UInt32.max)
|
||||
meshPacket.priority = MeshPacket.Priority.reliable
|
||||
meshPacket.wantAck = false
|
||||
meshPacket.wantAck = wantResponse
|
||||
meshPacket.hopLimit = 0
|
||||
|
||||
var dataMessage = DataMessage()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct Connect: View {
|
|||
var body: some View {
|
||||
|
||||
let firmwareVersion = bleManager.lastConnnectionVersion
|
||||
let minimumVersion = "1.3.16"
|
||||
let minimumVersion = "1.3.19"
|
||||
let supportedVersion = firmwareVersion == "0.0.0" || minimumVersion.compare(firmwareVersion, options: .numeric) == .orderedAscending || minimumVersion.compare(firmwareVersion, options: .numeric) == .orderedSame
|
||||
|
||||
NavigationView {
|
||||
|
|
@ -38,7 +38,7 @@ struct Connect: View {
|
|||
|
||||
Section(header: Text("Upgrade your Firmware").font(.title)) {
|
||||
|
||||
Text("🚨 1.3 ALPHA PREVIEW Your firmware version is unsupported by the preview the minimum firmware version is \(minimumVersion).").font(.subheadline).foregroundColor(.red)
|
||||
Text("🚨 1.3 ALPHA PREVIEW Your firmware version is unsupported by the preview the minimum firmware version is \(minimumVersion) this is a hard limit.").font(.subheadline).foregroundColor(.red)
|
||||
}
|
||||
.textCase(nil)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,23 +331,18 @@ public struct MapView: UIViewRepresentable {
|
|||
// Make a fast exit if the annotation is the `MKUserLocation`, as it's not an annotation view we wish to customize.
|
||||
return nil
|
||||
}
|
||||
|
||||
var annotationView: MKAnnotationView?
|
||||
//var annotationView: MKAnnotationView?
|
||||
|
||||
if let annotation = annotation as? PositionAnnotation {
|
||||
let identifier = NSStringFromClass(PositionAnnotationView.self)
|
||||
|
||||
//let annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: identifier) as? PositionAnnotationView ?? PositionAnnotationView()
|
||||
let annotationView = PositionAnnotationView(annotation: annotation, reuseIdentifier: "PositionAnnotation")
|
||||
|
||||
annotationView.name = annotation.shortName ?? "???"
|
||||
|
||||
annotationView.name = annotation.shortName ?? "????"
|
||||
annotationView.canShowCallout = true
|
||||
|
||||
return annotationView
|
||||
}
|
||||
|
||||
return annotationView
|
||||
return nil
|
||||
}
|
||||
|
||||
public func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue