ESPHome  2022.6.2
ms5611.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace ms5611 {
9 
11  public:
12  void setup() override;
13  void dump_config() override;
14  float get_setup_priority() const override;
15  void update() override;
16 
17  void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
18  void set_pressure_sensor(sensor::Sensor *pressure_sensor) { pressure_sensor_ = pressure_sensor; }
19 
20  protected:
21  void read_temperature_();
22  void read_pressure_(uint32_t raw_temperature);
23  void calculate_values_(uint32_t raw_temperature, uint32_t raw_pressure);
24 
27  uint16_t prom_[6];
28 };
29 
30 } // namespace ms5611
31 } // namespace esphome
sensor::Sensor * pressure_sensor_
Definition: ms5611.h:26
sensor::Sensor * temperature_sensor_
Definition: ms5611.h:25
void read_pressure_(uint32_t raw_temperature)
Definition: ms5611.cpp:69
void dump_config() override
Definition: ms5611.cpp:31
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition: ms5611.h:17
void calculate_values_(uint32_t raw_temperature, uint32_t raw_pressure)
Definition: ms5611.cpp:83
This class simplifies creating components that periodically check a state.
Definition: component.h:266
float get_setup_priority() const override
Definition: ms5611.cpp:41
Definition: a4988.cpp:4
Base-class for all sensors.
Definition: sensor.h:47
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
Definition: ms5611.h:18