treat disabiling bluetooth as loss of connection

This commit is contained in:
geeksville 2020-02-04 17:27:10 -08:00
parent 9e83bfd790
commit 8ce5a13cf8
4 changed files with 59 additions and 16 deletions

View file

@ -53,8 +53,8 @@ class SoftwareUpdateService : JobIntentService(), Logging {
// we begin by setting our MTU size as high as it can go
sync.requestMtu(512)
val service = sync.gatt.services.find { it.uuid == SW_UPDATE_UUID }!!
val service = sync.gatt!!.services.find { it.uuid == SW_UPDATE_UUID }!!
val totalSizeDesc = service.getCharacteristic(SW_UPDATE_TOTALSIZE_CHARACTER)
val dataDesc = service.getCharacteristic(SW_UPDATE_DATA_CHARACTER)