mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add From num case
This commit is contained in:
parent
aa77009ee6
commit
590f1fd783
1 changed files with 11 additions and 2 deletions
|
|
@ -626,7 +626,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
fetchedNode[0].user!.macaddr = decodedInfo.nodeInfo.user.macaddr
|
||||
fetchedNode[0].user!.hwModel = String(describing: decodedInfo.nodeInfo.user.hwModel).uppercased()
|
||||
}
|
||||
|
||||
|
||||
if decodedInfo.nodeInfo.hasDeviceMetrics {
|
||||
|
||||
let newTelemetry = TelemetryEntity(context: context!)
|
||||
|
|
@ -1049,8 +1049,17 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
peripherals.removeAll(where: { $0.peripheral.state == CBPeripheralState.disconnected })
|
||||
}
|
||||
|
||||
case FROMNUM_UUID :
|
||||
print("🚨 FROMNUM Characteristic UUID: \(characteristic.uuid)")
|
||||
if characteristic.value == nil || characteristic.value!.isEmpty {
|
||||
return
|
||||
}
|
||||
|
||||
var decodedInfo = FromRadio()
|
||||
|
||||
decodedInfo = try! FromRadio(serializedData: characteristic.value!)
|
||||
|
||||
default:
|
||||
// Likely FROMNUM_UUID
|
||||
print("🚨 Unhandled Characteristic UUID: \(characteristic.uuid)")
|
||||
}
|
||||
peripheral.readValue(for: FROMRADIO_characteristic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue