geeksville 2020-05-11 11:44:24 -07:00
rodzic d811fc6ac4
commit 33265c7c2e
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -28,6 +28,7 @@ import com.geeksville.util.*
import com.google.android.gms.common.api.ResolvableApiException
import com.google.android.gms.location.*
import com.google.protobuf.ByteString
import com.google.protobuf.InvalidProtocolBufferException
import kotlinx.coroutines.*
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
@ -976,9 +977,14 @@ class MeshService : Service(), Logging {
startConfig()
reportConnection()
} catch (ex: InvalidProtocolBufferException) {
errormsg(
"Invalid protocol buffer sent by device - update device software and try again",
ex
)
} catch (ex: RadioNotConnectedException) {
// note: no need to call startDeviceSleep(), because this exception could only have reached us if it was already called
error("Lost connection to radio during init - waiting for reconnect")
errormsg("Lost connection to radio during init - waiting for reconnect")
} catch (ex: RemoteException) {
// It seems that when the ESP32 goes offline it can briefly come back for a 100ms ish which
// causes the phone to try and reconnect. If we fail downloading our initial radio state we don't want to