mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
requestConfig refactor
This commit is contained in:
parent
346a7d1b75
commit
213164e95b
1 changed files with 10 additions and 6 deletions
|
|
@ -1363,12 +1363,16 @@ class MeshService : Service(), Logging {
|
|||
warn("Ignoring stale config complete")
|
||||
}
|
||||
|
||||
private fun requestDeviceConfig() {
|
||||
AdminProtos.AdminMessage.ConfigType.values().forEach {
|
||||
sendToRadio(newMeshPacketTo(myNodeNum).buildAdminPacket(wantResponse = true) {
|
||||
if (it != AdminProtos.AdminMessage.ConfigType.UNRECOGNIZED) getConfigRequest = it
|
||||
})
|
||||
}
|
||||
private fun requestConfig(config: AdminProtos.AdminMessage.ConfigType) {
|
||||
sendToRadio(newMeshPacketTo(myNodeNum).buildAdminPacket(wantResponse = true) {
|
||||
getConfigRequest = config
|
||||
})
|
||||
}
|
||||
|
||||
private fun requestAllConfig() {
|
||||
AdminProtos.AdminMessage.ConfigType.values().filter {
|
||||
it != AdminProtos.AdminMessage.ConfigType.UNRECOGNIZED
|
||||
}.forEach(::requestConfig)
|
||||
}
|
||||
|
||||
private fun requestChannel(channelIndex: Int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue