From bba9def20ebdae072e3f4a08794a95ff18c1791b Mon Sep 17 00:00:00 2001 From: geeksville Date: Sun, 24 May 2020 08:47:36 -0700 Subject: [PATCH] it has been a couple of weeks since new API rolled out, now just always use it --- .../com/geeksville/mesh/service/RadioInterfaceService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt index 6de76b89d..c99cd48c4 100644 --- a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt @@ -149,9 +149,9 @@ class RadioInterfaceService : Service(), Logging { private var runningService: RadioInterfaceService? = null /** - * Temp hack (until old API deprecated), we probe for old API at connected + * Temp hack (until old API deprecated), we now hardwire for the new API, I'll delete the old code in about a week */ - var isOldApi: Boolean? = null + var isOldApi: Boolean? = false /// This is public only so that SimRadio can bootstrap our message flow fun broadcastReceivedFromRadio(context: Context, payload: ByteArray) { @@ -436,7 +436,7 @@ class RadioInterfaceService : Service(), Logging { delay(500) // android BLE is buggy and needs a 500ms sleep before calling getChracteristic, or you might get back null // service could be null, test this by throwing BLEException and testing it on my machine - isOldApi = service.getCharacteristic(BTM_RADIO_CHARACTER) != null + // isOldApi = service.getCharacteristic(BTM_RADIO_CHARACTER) != null warn("Use oldAPI = $isOldApi") /* if (isFirstTime) {