fix autobug warning

com.geeksville.mesh.service.MeshService.getConnectedRadio (MeshService.java:223)
com.geeksville.mesh.service.MeshService.sendToRadio (MeshService.java:230)
com.geeksville.mesh.service.MeshService.sendToRadio (MeshService.java:237)
com.geeksville.mesh.service.MeshService.sendPosition (MeshService.java:1255)
com.geeksville.mesh.service.MeshService.access$getNodeDBbyID$p (MeshService.java:47)
com.geeksville.mesh.service.MeshService$sendPositionScoped$1.invokeSuspend (MeshService.java:1265)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:56)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:571)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:738)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:678)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:665)
pull/214/head
Kevin Hester 2021-01-05 14:01:45 +08:00
rodzic 6fbe63c0b7
commit 1eb63e4f1c
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -1262,7 +1262,12 @@ class MeshService : Service(), Logging {
destNum: Int = NODENUM_BROADCAST,
wantResponse: Boolean = false
) = serviceScope.handledLaunch {
sendPosition(lat, lon, alt, destNum, wantResponse)
try {
sendPosition(lat, lon, alt, destNum, wantResponse)
}
catch(ex: RadioNotConnectedException) {
warn("Ignoring disconnected radio during gps location update")
}
}
/** Send our current radio config to the device