kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Fix autobug: some BLE implementations might not be completed
with service enumeration by the time they call the discover services callback. Therefore be careful to not touch "service" until after the 500ms delay everyone on stackoverflow says these buggy drivers need.pull/28/head
rodzic
a201de649c
commit
b194659e8a
|
@ -376,7 +376,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||
// FIXME - no need to discover services more than once - instead use lazy() to use them in future attempts
|
||||
safe!!.asyncDiscoverServices { discRes ->
|
||||
discRes.getOrThrow() // FIXME, instead just try to reconnect?
|
||||
debug("Discovered services! Service size=${service.characteristics.size}")
|
||||
debug("Discovered services!")
|
||||
|
||||
// we begin by setting our MTU size as high as it can go
|
||||
safe!!.asyncRequestMtu(512) { mtuRes ->
|
||||
|
|
Ładowanie…
Reference in New Issue