mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Don't spam the node with reads to fromnum
This commit is contained in:
parent
a7d436d0b4
commit
8911cfd6cc
1 changed files with 4 additions and 1 deletions
|
|
@ -376,7 +376,10 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
|
||||
switch characteristic.uuid {
|
||||
case FROMNUM_UUID:
|
||||
peripheral.readValue(for: FROMNUM_characteristic)
|
||||
//Dont need to call readValue here, the value is already here from the notify
|
||||
//readValue in turn calls this callback so we end up spamming the node with fromnum reads continuously
|
||||
//peripheral.readValue(for: FROMNUM_characteristic)
|
||||
|
||||
let characteristicValue: [UInt8] = [UInt8](characteristic.value!)
|
||||
let bigEndianUInt32 = characteristicValue.withUnsafeBytes { $0.load(as: UInt32.self) }
|
||||
let returnValue = CFByteOrderGetCurrent() == CFByteOrder(CFByteOrderLittleEndian.rawValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue