M5Unit-ENV 1.2.0 git rev:d576302
|
Pressure and temperature sensor unit. More...
#include <unit_BMP280.hpp>
Classes | |
struct | config_t |
Settings for begin. More... | |
Public Member Functions | |
UnitBMP280 (const uint8_t addr=DEFAULT_ADDRESS) | |
virtual bool | begin () override |
virtual void | update (const bool force=false) override |
bool | softReset () |
Soft reset. | |
Settings for begin | |
config_t | config () |
Gets the configration. | |
void | config (const config_t &cfg) |
Set the configration. | |
Measurement data by periodic | |
float | temperature () const |
Oldest measured temperature (Celsius) | |
float | celsius () const |
Oldest measured temperature (Celsius) | |
float | fahrenheit () const |
Oldest measured temperature (Fahrenheit) | |
float | pressure () const |
Oldest measured pressure (Pa) | |
Periodic measurement | |
bool | startPeriodicMeasurement (const bmp280::Oversampling osrsPressure, const bmp280::Oversampling osrsTemperature, const bmp280::Filter filter, const bmp280::Standby st) |
Start periodic measurement. | |
bool | startPeriodicMeasurement () |
Start periodic measurement using current settings. | |
bool | stopPeriodicMeasurement () |
Stop periodic measurement. | |
Single shot measurement | |
bool | measureSingleshot (bmp280::Data &d, const bmp280::Oversampling osrsPressure, const bmp280::Oversampling osrsTemperature, const bmp280::Filter filter) |
Measurement single shot. | |
bool | measureSingleshot (bmp280::Data &d) |
Measurement single shot using current settings. | |
Settings | |
bool | readOversampling (bmp280::Oversampling &osrsPressure, bmp280::Oversampling &osrsTemperature) |
Read the oversampling conditions. | |
bool | writeOversampling (const bmp280::Oversampling osrsPressure, const bmp280::Oversampling osrsTemperature) |
Write the oversampling conditions. | |
bool | writeOversamplingPressure (const bmp280::Oversampling osrsPressure) |
Write the oversampling conditions for pressure. | |
bool | writeOversamplingTemperature (const bmp280::Oversampling osrsTemperature) |
Write the oversampling conditions for temperature. | |
bool | writeOversampling (const bmp280::OversamplingSetting osrss) |
Write the oversampling by OversamplingSetting. | |
bool | readFilter (bmp280::Filter &f) |
Read the IIR filter co-efficient. | |
bool | writeFilter (const bmp280::Filter &f) |
Write the IIR filter co-efficient. | |
bool | readStandbyTime (bmp280::Standby &s) |
Read the standby time. | |
bool | writeStandbyTime (const bmp280::Standby s) |
Write the standby time. | |
bool | readPowerMode (bmp280::PowerMode &m) |
Read the power mode. | |
bool | writePowerMode (const bmp280::PowerMode m) |
Write the power mode. | |
bool | writeUseCaseSetting (const bmp280::UseCase uc) |
Write the settings based on use cases. | |
Protected Member Functions | |
bool | start_periodic_measurement (const bmp280::Oversampling osrsPressure, const bmp280::Oversampling osrsTemperature, const bmp280::Filter filter, const bmp280::Standby st) |
bool | start_periodic_measurement () |
bool | stop_periodic_measurement () |
bool | read_measurement (bmp280::Data &d) |
bool | measure_singleshot (bmp280::Data &d) |
bool | read_trimming (bmp280::Trimming &t) |
bool | is_data_ready () |
M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitBMP280, bmp280::Data) | |
Protected Attributes | |
std::unique_ptr< m5::container::CircularBuffer< bmp280::Data > > | _data {} |
config_t | _cfg {} |
bmp280::Trimming | _trimming {} |
Pressure and temperature sensor unit.
bool m5::unit::UnitBMP280::measureSingleshot | ( | bmp280::Data & | d, |
const bmp280::Oversampling | osrsPressure, | ||
const bmp280::Oversampling | osrsTemperature, | ||
const bmp280::Filter | filter ) |
Measurement single shot.
[out] | data | Measuerd data |
osrsPressure | Oversampling factor for pressure | |
osrsTemperature | Oversampling factor for temperature | |
filter | Filter coeff |
bool m5::unit::UnitBMP280::readFilter | ( | bmp280::Filter & | f | ) |
Read the IIR filter co-efficient.
[out] | f | filter |
bool m5::unit::UnitBMP280::readOversampling | ( | bmp280::Oversampling & | osrsPressure, |
bmp280::Oversampling & | osrsTemperature ) |
Read the oversampling conditions.
[out] | osrsPressure | Oversampling for pressure |
[out] | osrsTemperature | Oversampling for temperature |
bool m5::unit::UnitBMP280::readPowerMode | ( | bmp280::PowerMode & | m | ) |
Read the power mode.
[out] | m | Power mode |
bool m5::unit::UnitBMP280::readStandbyTime | ( | bmp280::Standby & | s | ) |
Read the standby time.
[out] | s | standby time |
bool m5::unit::UnitBMP280::softReset | ( | ) |
Soft reset.
|
inline |
Start periodic measurement.
osrsPressure | Oversampling factor for pressure |
osrsTemperature | Oversampling factor for temperature |
filter | Filter coeff |
st | Standby time |
|
inline |
Stop periodic measurement.
bool m5::unit::UnitBMP280::writeFilter | ( | const bmp280::Filter & | f | ) |
Write the IIR filter co-efficient.
f | filter |
bool m5::unit::UnitBMP280::writeOversampling | ( | const bmp280::Oversampling | osrsPressure, |
const bmp280::Oversampling | osrsTemperature ) |
Write the oversampling conditions.
osrsPressure | Oversampling for pressure |
osrsTemperature | Oversampling for temperature |
bool m5::unit::UnitBMP280::writeOversampling | ( | const bmp280::OversamplingSetting | osrss | ) |
Write the oversampling by OversamplingSetting.
osrss | OversamplingSetting |
bool m5::unit::UnitBMP280::writeOversamplingPressure | ( | const bmp280::Oversampling | osrsPressure | ) |
Write the oversampling conditions for pressure.
osrsPressure | Oversampling for pressure |
bool m5::unit::UnitBMP280::writeOversamplingTemperature | ( | const bmp280::Oversampling | osrsTemperature | ) |
Write the oversampling conditions for temperature.
osrsTemperature | Oversampling for temperature |
bool m5::unit::UnitBMP280::writePowerMode | ( | const bmp280::PowerMode | m | ) |
Write the power mode.
m | Power mode |
bool m5::unit::UnitBMP280::writeStandbyTime | ( | const bmp280::Standby | s | ) |
Write the standby time.
s | standby time |
bool m5::unit::UnitBMP280::writeUseCaseSetting | ( | const bmp280::UseCase | uc | ) |
Write the settings based on use cases.
uc | UseCase |