|
M5Unit-ENV 1.3.1 git rev:73f34ff
|
Barometric pressure sensor to measure atmospheric pressure and altitude estimation. More...
#include <unit_QMP6988.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| UnitQMP6988 (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 qmp6988::Oversampling osrsPressure, const qmp6988::Oversampling osrsTemperature, const qmp6988::Filter f, const qmp6988::Standby st) |
| Start periodic measurement. | |
| bool | startPeriodicMeasurement () |
| Start periodic measurement using current settings. | |
| bool | stopPeriodicMeasurement () |
| Stop periodic measurement. | |
Single shot measurement | |
| bool | measureSingleshot (qmp6988::Data &d, const qmp6988::Oversampling osrsPressure, const qmp6988::Oversampling osrsTemperature, const qmp6988::Filter f) |
| Measurement single shot. | |
| bool | measureSingleshot (qmp6988::Data &d) |
| Measurement single shot using current settings. | |
Settings | |
| bool | readOversampling (qmp6988::Oversampling &osrsPressure, qmp6988::Oversampling &osrsTemperature) |
| Read the oversampling conditions. | |
| bool | writeOversampling (const qmp6988::Oversampling osrsPressure, const qmp6988::Oversampling osrsTemperature) |
| Write the oversampling conditions. | |
| bool | writeOversamplingPressure (const qmp6988::Oversampling osrsPressure) |
| Write the oversampling conditions for pressure. | |
| bool | writeOversamplingTemperature (const qmp6988::Oversampling osrsTemperature) |
| Write the oversampling conditions for temperature. | |
| bool | writeOversampling (const qmp6988::OversamplingSetting osrss) |
| Write the oversampling by OversamplingSetting. | |
| bool | readFilter (qmp6988::Filter &f) |
| Read the IIR filter co-efficient. | |
| bool | writeFilter (const qmp6988::Filter f) |
| Write the IIR filter co-efficient. | |
| bool | readStandbyTime (qmp6988::Standby &st) |
| Read the standby time. | |
| bool | writeStandbyTime (const qmp6988::Standby st) |
| Write the standby time. | |
| bool | readPowerMode (qmp6988::PowerMode &mode) |
| Read the power mode. | |
| bool | writePowerMode (const qmp6988::PowerMode mode) |
| Write the power mode. | |
| bool | writeUseCaseSetting (const qmp6988::UseCase uc) |
| Write the settings based on use cases. | |
Protected Member Functions | |
| bool | start_periodic_measurement () |
| bool | start_periodic_measurement (const qmp6988::Oversampling ost, const qmp6988::Oversampling osp, const qmp6988::Filter f, const qmp6988::Standby st) |
| bool | stop_periodic_measurement () |
| bool | read_calibration (qmp6988::Calibration &c) |
| bool | read_measurement (qmp6988::Data &d, const bool only_temperature=false) |
| bool | is_data_ready () |
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitQMP6988, qmp6988::Data) | |
Protected Attributes | |
| std::unique_ptr< m5::container::CircularBuffer< qmp6988::Data > > | _data {} |
| qmp6988::Calibration | _calibration {} |
| config_t | _cfg {} |
| bool | _only_temperature {} |
Barometric pressure sensor to measure atmospheric pressure and altitude estimation.
| bool m5::unit::UnitQMP6988::measureSingleshot | ( | qmp6988::Data & | d, |
| const qmp6988::Oversampling | osrsPressure, | ||
| const qmp6988::Oversampling | osrsTemperature, | ||
| const qmp6988::Filter | f ) |
Measurement single shot.
| [out] | data | Measuerd data |
| osrsPressure | Oversampling factor for pressure | |
| osrsTemperature | Oversampling factor for temperature | |
| filter | Filter coeff |
| bool m5::unit::UnitQMP6988::readFilter | ( | qmp6988::Filter & | f | ) |
Read the IIR filter co-efficient.
| [out] | f | filter |
| bool m5::unit::UnitQMP6988::readOversampling | ( | qmp6988::Oversampling & | osrsPressure, |
| qmp6988::Oversampling & | osrsTemperature ) |
Read the oversampling conditions.
| [out] | osrsPressure | Oversampling for pressure |
| [out] | osrsTemperature | Oversampling for temperature |
| bool m5::unit::UnitQMP6988::readPowerMode | ( | qmp6988::PowerMode & | mode | ) |
Read the power mode.
| [out] | mode | PowerMode |
| bool m5::unit::UnitQMP6988::readStandbyTime | ( | qmp6988::Standby & | st | ) |
Read the standby time.
| [out] | st | standby time |
| bool m5::unit::UnitQMP6988::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::UnitQMP6988::writeFilter | ( | const qmp6988::Filter | f | ) |
Write the IIR filter co-efficient.
| f | filter |
| bool m5::unit::UnitQMP6988::writeOversampling | ( | const qmp6988::Oversampling | osrsPressure, |
| const qmp6988::Oversampling | osrsTemperature ) |
Write the oversampling conditions.
| osrsPressure | Oversampling for pressure |
| osrsTemperature | Oversampling for temperature |
| bool m5::unit::UnitQMP6988::writeOversampling | ( | const qmp6988::OversamplingSetting | osrss | ) |
Write the oversampling by OversamplingSetting.
| osrss | OversamplingSetting |
| bool m5::unit::UnitQMP6988::writeOversamplingPressure | ( | const qmp6988::Oversampling | osrsPressure | ) |
Write the oversampling conditions for pressure.
| osrsPressure | Oversampling for pressure |
| bool m5::unit::UnitQMP6988::writeOversamplingTemperature | ( | const qmp6988::Oversampling | osrsTemperature | ) |
Write the oversampling conditions for temperature.
| osrsTemperature | Oversampling for temperature |
| bool m5::unit::UnitQMP6988::writePowerMode | ( | const qmp6988::PowerMode | mode | ) |
Write the power mode.
| m | Power mode |
| bool m5::unit::UnitQMP6988::writeStandbyTime | ( | const qmp6988::Standby | st | ) |
Write the standby time.
| st | standby time |
| bool m5::unit::UnitQMP6988::writeUseCaseSetting | ( | const qmp6988::UseCase | uc | ) |
Write the settings based on use cases.
| uc | UseCase |