mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
add module config fromRadio
This commit is contained in:
parent
a93d4e1dcd
commit
9427eec72f
1 changed files with 13 additions and 0 deletions
|
|
@ -1130,6 +1130,7 @@ class MeshService : Service(), Logging {
|
|||
MeshProtos.FromRadio.MY_INFO_FIELD_NUMBER -> handleMyInfo(proto.myInfo)
|
||||
MeshProtos.FromRadio.NODE_INFO_FIELD_NUMBER -> handleNodeInfo(proto.nodeInfo)
|
||||
MeshProtos.FromRadio.CONFIG_FIELD_NUMBER -> handleDeviceConfig(proto.config)
|
||||
MeshProtos.FromRadio.MODULECONFIG_FIELD_NUMBER -> handleModuleConfig(proto.moduleConfig)
|
||||
else -> errormsg("Unexpected FromRadio variant")
|
||||
}
|
||||
} catch (ex: InvalidProtocolBufferException) {
|
||||
|
|
@ -1158,6 +1159,18 @@ class MeshService : Service(), Logging {
|
|||
setLocalConfig(config)
|
||||
}
|
||||
|
||||
private fun handleModuleConfig(module: ModuleConfigProtos.ModuleConfig) {
|
||||
debug("Received moduleConfig ${module.toOneLineString()}")
|
||||
val packetToSave = MeshLog(
|
||||
UUID.randomUUID().toString(),
|
||||
"ModuleConfig ${module.payloadVariantCase}",
|
||||
System.currentTimeMillis(),
|
||||
module.toString()
|
||||
)
|
||||
insertMeshLog(packetToSave)
|
||||
// setModuleConfig(config)
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a protobuf NodeInfo into our model objects and update our node DB
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue