13#define QMP6988_U16_t unsigned short
14#define QMP6988_S16_t short
15#define QMP6988_U32_t unsigned int
16#define QMP6988_S32_t int
17#define QMP6988_U64_t unsigned long long
18#define QMP6988_S64_t long long
46 QMP6988_S32_t COE_b00;
47 QMP6988_S16_t COE_bt1;
48 QMP6988_S16_t COE_bt2;
49 QMP6988_S16_t COE_bp1;
50 QMP6988_S16_t COE_b11;
51 QMP6988_S16_t COE_bp2;
52 QMP6988_S16_t COE_b12;
53 QMP6988_S16_t COE_b21;
54 QMP6988_S16_t COE_bp3;
59 float a1, a2, bt1, bt2, bp1, b11, bp2, b12, b21, bp3;
63 QMP6988_S32_t a0, b00;
65 QMP6988_S64_t bt1, bt2, bp1, b11, bp2, b12, b21, bp3;
83 void setup()
override;
This class simplifies creating components that periodically check a state.
This Class provides the methods to read/write bytes from/to an i2c device.
QMP6988IIRFilter iir_filter_
sensor::Sensor * temperature_sensor_
QMP6988_S32_t get_compensated_pressure_(qmp6988_ik_data_t *ik, QMP6988_S32_t dp, QMP6988_S16_t tx)
void calculate_altitude_(float pressure, float temp)
float get_setup_priority() const override
void calculate_pressure_()
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
QMP6988Oversampling pressure_oversampling_
bool get_calibration_data_()
sensor::Sensor * pressure_sensor_
QMP6988Oversampling temperature_oversampling_
void set_iir_filter(QMP6988IIRFilter iirfilter)
void set_temperature_oversampling(QMP6988Oversampling oversampling_t)
void dump_config() override
QMP6988_S16_t get_compensated_temperature_(qmp6988_ik_data_t *ik, QMP6988_S32_t dt)
void set_power_mode_(uint8_t power_mode)
void write_filter_(unsigned char filter)
qmp6988_data_t qmp6988_data_
void write_oversampling_temperature_(unsigned char oversampling_t)
void write_oversampling_pressure_(unsigned char oversampling_p)
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
void set_pressure_oversampling(QMP6988Oversampling oversampling_p)
Base-class for all sensors.
struct Qmp6988FkData { float a0, b00; float a1, a2, bt1, bt2, bp1, b11, bp2, b12, b21, bp3;} qmp6988_fk_data_t
@ QMP6988_OVERSAMPLING_8X
@ QMP6988_OVERSAMPLING_SKIPPED
@ QMP6988_OVERSAMPLING_16X
@ QMP6988_OVERSAMPLING_32X
@ QMP6988_OVERSAMPLING_2X
@ QMP6988_OVERSAMPLING_64X
@ QMP6988_OVERSAMPLING_1X
@ QMP6988_OVERSAMPLING_4X
struct Qmp6988CaliData { QMP6988_S32_t COE_a0; QMP6988_S16_t COE_a1; QMP6988_S16_t COE_a2; QMP6988_S32_t COE_b00; QMP6988_S16_t COE_bt1; QMP6988_S16_t COE_bt2; QMP6988_S16_t COE_bp1; QMP6988_S16_t COE_b11; QMP6988_S16_t COE_bp2; QMP6988_S16_t COE_b12; QMP6988_S16_t COE_b21; QMP6988_S16_t COE_bp3;} qmp6988_cali_data_t
struct Qmp6988Data { uint8_t chip_id; uint8_t power_mode; float temperature; float pressure; float altitude; qmp6988_cali_data_t qmp6988_cali; qmp6988_ik_data_t ik;} qmp6988_data_t
struct Qmp6988IkData { QMP6988_S32_t a0, b00; QMP6988_S32_t a1, a2; QMP6988_S64_t bt1, bt2, bp1, b11, bp2, b12, b21, bp3;} qmp6988_ik_data_t
Providing packet encoding functions for exchanging data with a remote host.