mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
cleaner way to find ble services
This commit is contained in:
parent
6f9316ce99
commit
dac3610f7d
1 changed files with 6 additions and 1 deletions
|
|
@ -170,7 +170,12 @@ class RadioInterfaceService : Service(), Logging {
|
|||
// Both of these are created in onCreate()
|
||||
private var safe: SafeBluetooth? = null
|
||||
|
||||
val service get() = safe!!.gatt!!.services.find { it.uuid == BTM_SERVICE_UUID }!!
|
||||
/// Our BLE device
|
||||
val device get() = safe!!.gatt!!
|
||||
|
||||
/// Our service
|
||||
val service get() = device.getService(BTM_SERVICE_UUID)
|
||||
//.services.find { it.uuid == BTM_SERVICE_UUID }!!
|
||||
|
||||
private lateinit var fromNum: BluetoothGattCharacteristic
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue