Merge pull request #378 from meshtastic/refactor-protos

Remove hw_model_deprecated
This commit is contained in:
Andre Kirchhoff 2022-02-15 20:40:47 -03:00 committed by GitHub
commit 2ac5913c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1300,15 +1300,10 @@ class MeshService : Service(), Logging {
val a = RadioInterfaceService.getBondedDeviceAddress(this)
val isBluetoothInterface = a != null && a.startsWith("x")
var hwModelStr = myInfo.hwModelDeprecated
if (hwModelStr.isEmpty()) {
val nodeNum =
myInfo.myNodeNum // Note: can't use the normal property because myNodeInfo not yet setup
val ni = nodeDBbyNodeNum[nodeNum] // can't use toNodeInfo because too early
val asStr = ni?.user?.hwModelString
if (asStr != null)
hwModelStr = asStr
}
val nodeNum =
myInfo.myNodeNum // Note: can't use the normal property because myNodeInfo not yet setup
val ni = nodeDBbyNodeNum[nodeNum] // can't use toNodeInfo because too early
val hwModelStr = ni?.user?.hwModelString
val mi = with(myInfo) {
MyNodeInfo(
myNodeNum,