pub enum Mode {
Standby = 0,
Pressure = 1,
Temperature = 2,
ContinuousPressure = 5,
ContinuousTemperature = 6,
ContinuousPressureTemperature = 7,
}Expand description
Use Barometer::set_mode to set the mode.
In continuous mode, the sensor will take measurements at the rate set by Barometer::set_pressure_config and Barometer::set_temperature_config. Note that pressure readings are dependent on temperature readings, so it is not recommended to use continuous mode for pressure readings because they will be calculated using out-of-date temperature readings.
Temperature and Pressure modes will take a single measurement and then return to standby mode. These are used internally by the Barometer::get_temperature and Barometer::get_pressure methods and are not recommended for general use.
Variants§
Standby = 0
The default mode. The sensor will not take any measurements. It is still possible to read the temperature and pressure, but the values will not be updated.
Pressure = 1
Take a single temperature reading and then return to standby mode.
Temperature = 2
Take a single pressure reading and then return to standby mode.
ContinuousPressure = 5
Take continuous pressure readings at the configured sample rate. Note that this mode is not recommended because pressure readings are dependent on temperature readings, so they will be calculated using out-of-date temperature readings.
ContinuousTemperature = 6
Take continuous temperature readings at the configured sample rate.
ContinuousPressureTemperature = 7
Take continuous pressure and temperature readings at the configured sample rate.