mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-05 13:22:59 -05:00
don't send BLE commands to meshservice while updating
This commit is contained in:
@@ -60,6 +60,7 @@ class MeshService : Service(), Logging {
|
||||
|
||||
class IdNotFoundException(id: String) : Exception("ID not found $id")
|
||||
class NodeNumNotFoundException(id: Int) : Exception("NodeNum not found $id")
|
||||
class IsUpdatingException() : Exception("Operation prohibited during firmware update")
|
||||
|
||||
/**
|
||||
* Talk to our running service and try to set a new device address. And then immediately
|
||||
@@ -228,6 +229,9 @@ class MeshService : Service(), Logging {
|
||||
private fun sendToRadio(p: ToRadio.Builder) {
|
||||
val b = p.build().toByteArray()
|
||||
|
||||
if(SoftwareUpdateService.isUpdating)
|
||||
throw IsUpdatingException()
|
||||
|
||||
connectedRadio.sendToRadio(b)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user