mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Handle nil nodeinfo better
This commit is contained in:
parent
b1f574d9bd
commit
5e4d542460
7 changed files with 37 additions and 8 deletions
23
Meshtastic/Assets.xcassets/WIPHONE.imageset/Contents.json
vendored
Normal file
23
Meshtastic/Assets.xcassets/WIPHONE.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-2.png
vendored
Normal file
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-2.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-3.png
vendored
Normal file
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-3.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-4.png
vendored
Normal file
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-4.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -566,13 +566,11 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
// NodeInfo
|
||||
if decodedInfo.nodeInfo.num > 0 {
|
||||
nowKnown = true
|
||||
let nodeInfo = nodeInfoPacket(nodeInfo: decodedInfo.nodeInfo, channel: decodedInfo.packet.channel, context: ctx)
|
||||
|
||||
if nodeInfo != nil {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo?.num ?? -1 {
|
||||
if nodeInfo!.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo?.user?.shortName ?? "?"
|
||||
connectedPeripheral.longName = nodeInfo?.user?.longName ?? "unknown".localized
|
||||
if let nodeInfo = nodeInfoPacket(nodeInfo: decodedInfo.nodeInfo, channel: decodedInfo.packet.channel, context: ctx) {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo.num {
|
||||
if nodeInfo.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo.user?.shortName ?? "?"
|
||||
connectedPeripheral.longName = nodeInfo.user?.longName ?? "unknown".localized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,10 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
/// LoRAType device: https://loratype.org/
|
||||
case loraType // = 19
|
||||
|
||||
///
|
||||
/// wiphone https://www.wiphone.io/
|
||||
case wiphone // = 20
|
||||
|
||||
///
|
||||
/// B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station
|
||||
case stationG1 // = 25
|
||||
|
|
@ -307,6 +311,7 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
case 17: self = .nanoG1Explorer
|
||||
case 18: self = .nanoG2Ultra
|
||||
case 19: self = .loraType
|
||||
case 20: self = .wiphone
|
||||
case 25: self = .stationG1
|
||||
case 26: self = .rak11310
|
||||
case 27: self = .senseloraRp2040
|
||||
|
|
@ -372,6 +377,7 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
case .nanoG1Explorer: return 17
|
||||
case .nanoG2Ultra: return 18
|
||||
case .loraType: return 19
|
||||
case .wiphone: return 20
|
||||
case .stationG1: return 25
|
||||
case .rak11310: return 26
|
||||
case .senseloraRp2040: return 27
|
||||
|
|
@ -442,6 +448,7 @@ extension HardwareModel: CaseIterable {
|
|||
.nanoG1Explorer,
|
||||
.nanoG2Ultra,
|
||||
.loraType,
|
||||
.wiphone,
|
||||
.stationG1,
|
||||
.rak11310,
|
||||
.senseloraRp2040,
|
||||
|
|
@ -2741,6 +2748,7 @@ extension HardwareModel: SwiftProtobuf._ProtoNameProviding {
|
|||
17: .same(proto: "NANO_G1_EXPLORER"),
|
||||
18: .same(proto: "NANO_G2_ULTRA"),
|
||||
19: .same(proto: "LORA_TYPE"),
|
||||
20: .same(proto: "WIPHONE"),
|
||||
25: .same(proto: "STATION_G1"),
|
||||
26: .same(proto: "RAK11310"),
|
||||
27: .same(proto: "SENSELORA_RP2040"),
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e21899aa6b2b49863cfa2758e5e3b6faacf04bba
|
||||
Subproject commit dd7d64cc038a6365c119ec7508762cc45f405948
|
||||
Loading…
Add table
Add a link
Reference in a new issue