0.5.6 if we lose connection during initial radio download, fail gracefully

This commit is contained in:
geeksville
2020-04-24 15:59:01 -07:00
parent e302848607
commit 51efde08c0
2 changed files with 5 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ android {
applicationId "com.geeksville.mesh"
minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works)
targetSdkVersion 29
versionCode 155
versionName "0.5.5"
versionCode 156
versionName "0.5.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@@ -970,6 +970,9 @@ class MeshService : Service(), Logging {
startConfig()
reportConnection()
} 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")
} 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