fix autobug: don't let users try to update firmware over USB

This commit is contained in:
Kevin Hester
2021-02-04 23:07:16 +08:00
parent 65e553f3d1
commit 97d2ecbd0f

View File

@@ -1085,6 +1085,9 @@ class MeshService : Service(), Logging {
setFirmwareUpdateFilename(myInfo)
val a = RadioInterfaceService.getBondedDeviceAddress(this)
val isBluetoothInterface = a != null && a.startsWith("x")
val mi = with(myInfo) {
MyNodeInfo(
myNodeNum,
@@ -1093,7 +1096,7 @@ class MeshService : Service(), Logging {
hwModel,
firmwareVersion,
firmwareUpdateFilename != null,
SoftwareUpdateService.shouldUpdate(
isBluetoothInterface && SoftwareUpdateService.shouldUpdate(
this@MeshService,
DeviceVersion(firmwareVersion)
),