bugfix formatting

This commit is contained in:
erikveg 2024-05-02 09:01:51 +00:00
parent b17c832269
commit bbb4e397bf
2 changed files with 7 additions and 7 deletions

View File

@ -2,18 +2,18 @@
#include "esphome/core/log.h" #include "esphome/core/log.h"
namespace esphome { namespace esphome {
namespace ain4_20ma { namespace ain420ma {
static const char *const TAG = "ain4_20ma"; static const char *const TAG = "ain4_20ma";
void Ain4_20maComponent::dump_config() { void Ain420maComponent::dump_config() {
ESP_LOGCONFIG(TAG, "AIN4-20mA Sensor:"); ESP_LOGCONFIG(TAG, "AIN4-20mA Sensor:");
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Sensor:", this); LOG_SENSOR(" ", "Sensor:", this);
} }
void Ain4_20maComponent::update() { void Ain420maComponent::update() {
uint8_t data[2]; uint8_t data[2];
i2c::ErrorCode err = this->read_register(0x20, 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 } // namespace esphome

View File

@ -5,14 +5,14 @@
#include "esphome/components/i2c/i2c.h" #include "esphome/components/i2c/i2c.h"
namespace esphome { 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: public:
float get_setup_priority() const override { return setup_priority::DATA; } float get_setup_priority() const override { return setup_priority::DATA; }
void dump_config() override; void dump_config() override;
void update() override; void update() override;
}; };
} // namespace ain4_20ma } // namespace ain420ma
} // namespace esphome } // namespace esphome