Always set gas sensor settings when setting any gas related setting, regards #3
This commit is contained in:
parent
722e054f58
commit
1682f433ab
1 changed files with 3 additions and 6 deletions
|
@ -212,22 +212,19 @@ impl SettingsBuilder {
|
||||||
self.sensor_settings.gas_sett.heatr_dur = Some(heatr_dur);
|
self.sensor_settings.gas_sett.heatr_dur = Some(heatr_dur);
|
||||||
self.sensor_settings.gas_sett.heatr_temp = Some(heatr_temp);
|
self.sensor_settings.gas_sett.heatr_temp = Some(heatr_temp);
|
||||||
self.sensor_settings.gas_sett.ambient_temperature = ambient_temperature;
|
self.sensor_settings.gas_sett.ambient_temperature = ambient_temperature;
|
||||||
self.desired_settings |= DesiredSensorSettings::RUN_GAS_SEL;
|
self.desired_settings |= DesiredSensorSettings::GAS_SENSOR_SEL;
|
||||||
self.desired_settings |= DesiredSensorSettings::GAS_MEAS_SEL;
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_nb_conv(mut self, nb_conv: u8) -> SettingsBuilder {
|
pub fn with_nb_conv(mut self, nb_conv: u8) -> SettingsBuilder {
|
||||||
self.sensor_settings.gas_sett.nb_conv = nb_conv;
|
self.sensor_settings.gas_sett.nb_conv = nb_conv;
|
||||||
self.desired_settings |= DesiredSensorSettings::NBCONV_SEL;
|
self.desired_settings |= DesiredSensorSettings::GAS_SENSOR_SEL;
|
||||||
self.desired_settings |= DesiredSensorSettings::GAS_MEAS_SEL;
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_run_gas(mut self, run_gas: bool) -> SettingsBuilder {
|
pub fn with_run_gas(mut self, run_gas: bool) -> SettingsBuilder {
|
||||||
self.sensor_settings.gas_sett.run_gas_measurement = run_gas;
|
self.sensor_settings.gas_sett.run_gas_measurement = run_gas;
|
||||||
self.desired_settings |= DesiredSensorSettings::RUN_GAS_SEL;
|
self.desired_settings |= DesiredSensorSettings::GAS_SENSOR_SEL;
|
||||||
self.desired_settings |= DesiredSensorSettings::GAS_MEAS_SEL;
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue