[−][src]Struct bme680::SettingsBuilder
Builder to construct the desired settings
Example
use bme680::{IIRFilterSize, OversamplingSetting, SettingsBuilder}; use std::time::Duration; let settings = SettingsBuilder::new() .with_humidity_oversampling(OversamplingSetting::OS2x) .with_pressure_oversampling(OversamplingSetting::OS4x) .with_temperature_oversampling(OversamplingSetting::OS8x) .with_temperature_filter(IIRFilterSize::Size3) .with_gas_measurement(Duration::from_millis(1500), 320, 25) .with_temperature_offset(-4.25) .with_run_gas(true) .build();
Methods
impl SettingsBuilder
[src]
pub fn new() -> SettingsBuilder
[src]
pub fn with_temperature_filter(self, filter: IIRFilterSize) -> SettingsBuilder
[src]
pub fn with_humidity_control(self, heatr_control: u8) -> SettingsBuilder
[src]
pub fn with_temperature_oversampling(
self,
os_temp: OversamplingSetting
) -> SettingsBuilder
[src]
self,
os_temp: OversamplingSetting
) -> SettingsBuilder
pub fn with_pressure_oversampling(
self,
os_pres: OversamplingSetting
) -> SettingsBuilder
[src]
self,
os_pres: OversamplingSetting
) -> SettingsBuilder
pub fn with_humidity_oversampling(
self,
os_hum: OversamplingSetting
) -> SettingsBuilder
[src]
self,
os_hum: OversamplingSetting
) -> SettingsBuilder
pub fn with_gas_measurement(
self,
heatr_dur: Duration,
heatr_temp: u16,
ambient_temperature: i8
) -> SettingsBuilder
[src]
self,
heatr_dur: Duration,
heatr_temp: u16,
ambient_temperature: i8
) -> SettingsBuilder
pub fn with_nb_conv(self, nb_conv: u8) -> SettingsBuilder
[src]
pub fn with_run_gas(self, run_gas: bool) -> SettingsBuilder
[src]
pub fn with_temperature_offset(self, offset: f32) -> SettingsBuilder
[src]
Temperature offset in Celsius, e.g. 4, -8, 1.25
pub fn build(self) -> Settings
[src]
Auto Trait Implementations
impl RefUnwindSafe for SettingsBuilder
impl Send for SettingsBuilder
impl Sync for SettingsBuilder
impl Unpin for SettingsBuilder
impl UnwindSafe for SettingsBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,