mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-04 12:52:22 -05:00
fix: missing ModuleConfig handling
This commit is contained in:
@@ -357,6 +357,7 @@ class RadioConfigViewModel @Inject constructor(
|
||||
setModuleConfig(moduleConfig { remoteHardware = it.remoteHardware })
|
||||
setModuleConfig(moduleConfig { neighborInfo = it.neighborInfo })
|
||||
setModuleConfig(moduleConfig { ambientLighting = it.ambientLighting })
|
||||
setModuleConfig(moduleConfig { detectionSensor = it.detectionSensor })
|
||||
setModuleConfig(moduleConfig { paxcounter = it.paxcounter })
|
||||
}
|
||||
setResponseStateSuccess()
|
||||
|
||||
@@ -48,6 +48,7 @@ class ModuleConfigRepository @Inject constructor(
|
||||
if (config.hasNeighborInfo()) setNeighborInfoConfig(config.neighborInfo)
|
||||
if (config.hasAmbientLighting()) setAmbientLightingConfig(config.ambientLighting)
|
||||
if (config.hasDetectionSensor()) setDetectionSensorConfig(config.detectionSensor)
|
||||
if (config.hasPaxcounter()) setPaxcounterConfig(config.paxcounter)
|
||||
}
|
||||
|
||||
private suspend fun setMQTTConfig(config: ModuleConfig.MQTTConfig) {
|
||||
@@ -121,4 +122,10 @@ class ModuleConfigRepository @Inject constructor(
|
||||
preference.toBuilder().setDetectionSensor(config).build()
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun setPaxcounterConfig(config: ModuleConfig.PaxcounterConfig) {
|
||||
moduleConfigStore.updateData { preference ->
|
||||
preference.toBuilder().setPaxcounter(config).build()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user