ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
xgzp6899dc.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
8
9namespace esphome::xgzp68xx {
10
13 public:
15 explicit XGZP6899DCComponent(float pressure_span);
16
20 void set_pressure_oversampling(uint8_t pressure_oversampling) {
21 this->pressure_oversampling_ = pressure_oversampling;
22 }
23
24 void update() override;
25 void setup() override;
26 void dump_config() override;
27
28 protected:
29 void read_data_();
30
31 // Pa per raw count
33 // Temperature = raw * temperature_scale_ + temperature_bias_, from the calibration registers
34 float temperature_scale_{0.0f};
35 float temperature_bias_{0.0f};
36 uint8_t pressure_oversampling_{UINT8_MAX};
37};
38
39} // namespace esphome::xgzp68xx
This class simplifies creating components that periodically check a state.
Definition component.h:532
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
XGZP6899DC: the XGZP6899D revision at I2C address 0x58 (datasheet V3.2), with a new register map.
Definition xgzp6899dc.h:12
SUB_SENSOR(temperature) SUB_SENSOR(pressure) void set_pressure_oversampling(uint8_t pressure_oversampling)
Set the CFG_OSR pressure oversampling code (0 = 256X ... 7 = 32768X). Unset keeps the factory value.
Definition xgzp6899dc.h:17
XGZP6899DCComponent(float pressure_span)
uint16_t temperature
Definition sun_gtil2.cpp:12
uint8_t pressure
Definition tt21100.cpp:7