kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: import DeviceProfile Config descriptor
rodzic
300904d337
commit
888c1aec6d
|
@ -338,7 +338,7 @@ class RadioConfigViewModel @Inject constructor(
|
||||||
setResponseStateError(ex.customMessage)
|
setResponseStateError(ex.customMessage)
|
||||||
}
|
}
|
||||||
if (hasConfig()) {
|
if (hasConfig()) {
|
||||||
val descriptor = config.descriptorForType
|
val descriptor = ConfigProtos.Config.getDescriptor()
|
||||||
config.allFields.forEach { (field, value) ->
|
config.allFields.forEach { (field, value) ->
|
||||||
val newConfig = ConfigProtos.Config.newBuilder()
|
val newConfig = ConfigProtos.Config.newBuilder()
|
||||||
.setField(descriptor.findFieldByName(field.name), value)
|
.setField(descriptor.findFieldByName(field.name), value)
|
||||||
|
@ -347,7 +347,7 @@ class RadioConfigViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasModuleConfig()) {
|
if (hasModuleConfig()) {
|
||||||
val descriptor = moduleConfig.descriptorForType
|
val descriptor = ModuleConfigProtos.ModuleConfig.getDescriptor()
|
||||||
moduleConfig.allFields.forEach { (field, value) ->
|
moduleConfig.allFields.forEach { (field, value) ->
|
||||||
val newConfig = ModuleConfigProtos.ModuleConfig.newBuilder()
|
val newConfig = ModuleConfigProtos.ModuleConfig.newBuilder()
|
||||||
.setField(descriptor.findFieldByName(field.name), value)
|
.setField(descriptor.findFieldByName(field.name), value)
|
||||||
|
|
Ładowanie…
Reference in New Issue