mirror of
https://github.com/esphome/esphome.git
synced 2025-01-21 03:45:58 +01:00
clang and header file modification
This commit is contained in:
parent
49bc27956c
commit
dd4ed0fbdc
2 changed files with 6 additions and 6 deletions
|
@ -123,8 +123,8 @@ float HDC2010Component::readTemp() {
|
|||
read_register(HDC2010_CMD_TEMPERATURE_LOW, &byte[0], 1);
|
||||
read_register(HDC2010_CMD_TEMPERATURE_HIGH, &byte[1], 1);
|
||||
|
||||
temp = (unsigned int)byte[1] << 8 | byte[0];
|
||||
return (float)temp * 165 / 65536 - 40;
|
||||
temp = (unsigned int) byte[1] << 8 | byte[0];
|
||||
return (float) temp * 165 / 65536 - 40;
|
||||
}
|
||||
|
||||
float HDC2010Component::readHumidity() {
|
||||
|
@ -134,8 +134,8 @@ float HDC2010Component::readHumidity() {
|
|||
read_register(HDC2010_CMD_HUMIDITY_LOW, &byte[0], 1);
|
||||
read_register(HDC2010_CMD_HUMIDITY_HIGH, &byte[1], 1);
|
||||
|
||||
humidity = (unsigned int)byte[1] << 8 | byte[0];
|
||||
return (float)humidity / 65536 * 100;
|
||||
humidity = (unsigned int) byte[1] << 8 | byte[0];
|
||||
return (float) humidity / 65536 * 100;
|
||||
}
|
||||
|
||||
float HDC2010Component::get_setup_priority() const { return setup_priority::DATA; }
|
||||
|
|
|
@ -18,9 +18,9 @@ class HDC2010Component : public PollingComponent, public i2c::I2CDevice {
|
|||
/// Retrieve the latest sensor values. This operation takes approximately 16ms.
|
||||
void update() override;
|
||||
|
||||
float readTemp() override;
|
||||
float readTemp();
|
||||
|
||||
float readHumidity() override;
|
||||
float readHumidity();
|
||||
|
||||
float get_setup_priority() const override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue