mirror of https://github.com/esphome/esphome.git
bugfix formatting
This commit is contained in:
parent
b17c832269
commit
bbb4e397bf
|
@ -2,18 +2,18 @@
|
|||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ain4_20ma {
|
||||
namespace ain420ma {
|
||||
|
||||
static const char *const TAG = "ain4_20ma";
|
||||
|
||||
void Ain4_20maComponent::dump_config() {
|
||||
void Ain420maComponent::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "AIN4-20mA Sensor:");
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
LOG_SENSOR(" ", "Sensor:", this);
|
||||
}
|
||||
|
||||
void Ain4_20maComponent::update() {
|
||||
void Ain420maComponent::update() {
|
||||
uint8_t data[2];
|
||||
|
||||
i2c::ErrorCode err = this->read_register(0x20, data, 2);
|
||||
|
@ -27,5 +27,5 @@ void Ain4_20maComponent::update() {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace ain4_20ma
|
||||
} // namespace ain420ma
|
||||
} // namespace esphome
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ain4_20ma {
|
||||
namespace ain420ma {
|
||||
|
||||
class Ain4_20maComponent : public i2c::I2CDevice, public PollingComponent, public sensor::Sensor {
|
||||
class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public sensor::Sensor {
|
||||
public:
|
||||
float get_setup_priority() const override { return setup_priority::DATA; }
|
||||
void dump_config() override;
|
||||
void update() override;
|
||||
};
|
||||
|
||||
} // namespace ain4_20ma
|
||||
} // namespace ain420ma
|
||||
} // namespace esphome
|
||||
|
|
Loading…
Reference in New Issue