mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #233 from meshtastic/2.0_Alpha_Launch
Crash Report Cleanup
This commit is contained in:
commit
2dcf1f950b
5 changed files with 15 additions and 23 deletions
|
|
@ -520,8 +520,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
if nodeInfo != nil {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo!.num {
|
||||
if nodeInfo!.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo!.user!.shortName ?? "????"
|
||||
connectedPeripheral.longName = nodeInfo!.user!.longName ?? "Unknown"
|
||||
connectedPeripheral.shortName = nodeInfo?.user?.shortName ?? "????"
|
||||
connectedPeripheral.longName = nodeInfo?.user?.longName ?? "Unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -776,17 +776,17 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
positionPacket.altitude = Int32(LocationHelper.currentAltitude)
|
||||
positionPacket.timestamp = UInt32(LocationHelper.currentTimestamp.timeIntervalSince1970)
|
||||
positionPacket.groundSpeed = UInt32(LocationHelper.currentSpeed)
|
||||
//positionPacket.groundTrack = UInt32(LocationHelper.currentHeading)
|
||||
|
||||
var waypointPacket = Waypoint()
|
||||
waypointPacket.latitudeI = Int32(LocationHelper.currentLocation.latitude * 1e7)
|
||||
waypointPacket.longitudeI = Int32(LocationHelper.currentLocation.longitude * 1e7)
|
||||
|
||||
let oneWeekFromNow = Calendar.current.date(byAdding: .day, value: 7, to: Date())
|
||||
waypointPacket.expire = UInt32(oneWeekFromNow!.timeIntervalSince1970)
|
||||
waypointPacket.name = "Test Waypoint"
|
||||
if LocationHelper.currentHeading > 0 {
|
||||
positionPacket.groundTrack = UInt32(LocationHelper.currentHeading)
|
||||
}
|
||||
|
||||
//var waypointPacket = Waypoint()
|
||||
//waypointPacket.latitudeI = Int32(LocationHelper.currentLocation.latitude * 1e7)
|
||||
//waypointPacket.longitudeI = Int32(LocationHelper.currentLocation.longitude * 1e7)
|
||||
|
||||
//let oneWeekFromNow = Calendar.current.date(byAdding: .day, value: 7, to: Date())
|
||||
//waypointPacket.expire = UInt32(oneWeekFromNow!.timeIntervalSince1970)
|
||||
//waypointPacket.name = "Test Waypoint"
|
||||
var meshPacket = MeshPacket()
|
||||
meshPacket.to = UInt32(destNum)
|
||||
meshPacket.from = 0 // Send 0 as from from phone to device to avoid warning about client trying to set node num
|
||||
|
|
|
|||
|
|
@ -7,15 +7,13 @@ import CoreData
|
|||
struct MeshtasticAppleApp: App {
|
||||
|
||||
let persistenceController = PersistenceController.shared
|
||||
|
||||
@ObservedObject private var bleManager: BLEManager = BLEManager.shared
|
||||
@ObservedObject private var userSettings: UserSettings = UserSettings()
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
@State var saveChannels = false
|
||||
@State var incomingUrl: URL?
|
||||
@State var channelSettings: String?
|
||||
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ struct Connect: View {
|
|||
Text("Num: \(String(node!.num))")
|
||||
Text("Short Name: \(node?.user?.shortName ?? "????")")
|
||||
Text("Long Name: \(node?.user?.longName ?? "Unknown")")
|
||||
Text("Max Channels: \(String(node!.myInfo!.maxChannels))")
|
||||
Text("Max Channels: \(String(node?.myInfo?.maxChannels ?? 0))")
|
||||
Text("Bitrate: \(String(format: "%.2f", node?.myInfo?.bitrate ?? 0.00))")
|
||||
Text("BLE RSSI: \(bleManager.connectedPeripheral.rssi)")
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ struct Contacts: View {
|
|||
List {
|
||||
Section(header: Text("Channels (groups)")) {
|
||||
// Display Contacts for the rest of the non admin channels
|
||||
if node != nil {
|
||||
ForEach(node!.myInfo!.channels?.array as! [ChannelEntity], id: \.self) { (channel: ChannelEntity) in
|
||||
if node != nil && node!.myInfo != nil && node!.myInfo!.channels != nil {
|
||||
ForEach(node!.myInfo!.channels!.array as! [ChannelEntity], id: \.self) { (channel: ChannelEntity) in
|
||||
if channel.name?.lowercased() ?? "" != "admin" && channel.name?.lowercased() ?? "" != "gpio" {
|
||||
VStack {
|
||||
NavigationLink(destination: ChannelMessageList(channel: channel)) {
|
||||
|
|
|
|||
|
|
@ -21,12 +21,6 @@ struct DeviceMetricsLog: View {
|
|||
|
||||
var node: NodeInfoEntity
|
||||
|
||||
struct MountPrice: Identifiable {
|
||||
var id = UUID()
|
||||
var mount: String
|
||||
var value: Double
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
let oneDayAgo = Calendar.current.date(byAdding: .day, value: -3, to: Date())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue