kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: missing `ModuleConfig` handling
rodzic
40aae19b45
commit
d21e735ae7
|
@ -357,6 +357,7 @@ class RadioConfigViewModel @Inject constructor(
|
||||||
setModuleConfig(moduleConfig { remoteHardware = it.remoteHardware })
|
setModuleConfig(moduleConfig { remoteHardware = it.remoteHardware })
|
||||||
setModuleConfig(moduleConfig { neighborInfo = it.neighborInfo })
|
setModuleConfig(moduleConfig { neighborInfo = it.neighborInfo })
|
||||||
setModuleConfig(moduleConfig { ambientLighting = it.ambientLighting })
|
setModuleConfig(moduleConfig { ambientLighting = it.ambientLighting })
|
||||||
|
setModuleConfig(moduleConfig { detectionSensor = it.detectionSensor })
|
||||||
setModuleConfig(moduleConfig { paxcounter = it.paxcounter })
|
setModuleConfig(moduleConfig { paxcounter = it.paxcounter })
|
||||||
}
|
}
|
||||||
setResponseStateSuccess()
|
setResponseStateSuccess()
|
||||||
|
|
|
@ -48,6 +48,7 @@ class ModuleConfigRepository @Inject constructor(
|
||||||
if (config.hasNeighborInfo()) setNeighborInfoConfig(config.neighborInfo)
|
if (config.hasNeighborInfo()) setNeighborInfoConfig(config.neighborInfo)
|
||||||
if (config.hasAmbientLighting()) setAmbientLightingConfig(config.ambientLighting)
|
if (config.hasAmbientLighting()) setAmbientLightingConfig(config.ambientLighting)
|
||||||
if (config.hasDetectionSensor()) setDetectionSensorConfig(config.detectionSensor)
|
if (config.hasDetectionSensor()) setDetectionSensorConfig(config.detectionSensor)
|
||||||
|
if (config.hasPaxcounter()) setPaxcounterConfig(config.paxcounter)
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun setMQTTConfig(config: ModuleConfig.MQTTConfig) {
|
private suspend fun setMQTTConfig(config: ModuleConfig.MQTTConfig) {
|
||||||
|
@ -121,4 +122,10 @@ class ModuleConfigRepository @Inject constructor(
|
||||||
preference.toBuilder().setDetectionSensor(config).build()
|
preference.toBuilder().setDetectionSensor(config).build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private suspend fun setPaxcounterConfig(config: ModuleConfig.PaxcounterConfig) {
|
||||||
|
moduleConfigStore.updateData { preference ->
|
||||||
|
preference.toBuilder().setPaxcounter(config).build()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue