pub enum SampleRate {
One = 0,
Two = 1,
Four = 2,
Eight = 3,
Sixteen = 4,
ThirtyTwo = 5,
SixtyFour = 6,
OneTwentyEight = 7,
}Expand description
Setting for the sampling and oversampling rates.
Use Barometer::set_pressure_config and Barometer::set_temperature_config to set the sampling and oversampling rates. The oversampling rate is the number of samples taken and averaged to produce a single reading. The sampling rate is the number of times per second that the sensor will record a new reading.
Variants§
One = 0
Take a single measurement per second or single oversample per measurement.
Two = 1
Two measurements per second or two oversamples per measurement. Labelled “Low Power” mode in the datasheet.
Four = 2
Four measurements per second or four oversamples per measurement.
Eight = 3
Eight measurements per second or eight oversamples per measurement. This is the default value.
Sixteen = 4
Sixteen measurements per second or sixteen oversamples per measurement. Labelled “Standard” mode in the datasheet.
ThirtyTwo = 5
Thirty-two measurements per second or thirty-two oversamples per measurement.
SixtyFour = 6
Sixty-four measurements per second or sixty-four oversamples per measurement. Labelled “High Precision” mode in the datasheet.
OneTwentyEight = 7
One hundred twenty-eight measurements per second or one hundred twenty-eight oversamples per measurement.
Trait Implementations§
Source§impl Clone for SampleRate
impl Clone for SampleRate
Source§fn clone(&self) -> SampleRate
fn clone(&self) -> SampleRate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more