detect UUID to warn firmware is too old

This commit is contained in:
andrekir 2022-10-12 23:40:54 -03:00
parent 3174b53c36
commit 22671a73db
3 changed files with 19 additions and 1 deletions

View file

@ -40,6 +40,7 @@ import com.geeksville.mesh.model.BluetoothViewModel
import com.geeksville.mesh.model.ChannelSet
import com.geeksville.mesh.model.DeviceVersion
import com.geeksville.mesh.model.UIViewModel
import com.geeksville.mesh.repository.radio.BluetoothInterface
import com.geeksville.mesh.repository.radio.RadioInterfaceService
import com.geeksville.mesh.repository.radio.SerialInterface
import com.geeksville.mesh.service.*
@ -416,6 +417,7 @@ class MainActivity : BaseActivity(), Logging {
/** Show an alert that may contain HTML */
private fun showAlert(titleText: Int, messageText: Int) {
// make links clickable per https://stackoverflow.com/a/62642807
// val messageStr = getText(messageText)
@ -476,6 +478,8 @@ class MainActivity : BaseActivity(), Logging {
}
}
}
} else if (BluetoothInterface.invalidVersion) {
showAlert(R.string.firmware_too_old, R.string.firmware_old)
}
} catch (ex: RemoteException) {
warn("Abandoning connect $ex, because we probably just lost device connection")