mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 22:26:36 +00:00
Streamline setup() logging (s, t, u, v, w, x, y, z) (#8930)
This commit is contained in:
parent
d99e3237f9
commit
8eac859bab
@ -26,7 +26,7 @@ static const uint16_t SCD30_CMD_TEMPERATURE_OFFSET = 0x5403;
|
||||
static const uint16_t SCD30_CMD_SOFT_RESET = 0xD304;
|
||||
|
||||
void SCD30Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up scd30...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
#ifdef USE_ESP8266
|
||||
Wire.setClockStretchLimit(150000);
|
||||
|
@ -27,7 +27,7 @@ static const uint16_t SCD41_ID = 0x1408;
|
||||
static const uint16_t SCD40_ID = 0x440;
|
||||
|
||||
void SCD4XComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up scd4x...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
// the sensor needs 1000 ms to enter the idle state
|
||||
this->set_timeout(1000, [this]() {
|
||||
this->status_clear_error();
|
||||
|
@ -61,7 +61,7 @@ void MR24HPC1Component::dump_config() {
|
||||
|
||||
// Initialisation functions
|
||||
void MR24HPC1Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up MR24HPC1...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->check_uart_settings(115200);
|
||||
|
||||
if (this->custom_mode_number_ != nullptr) {
|
||||
|
@ -30,7 +30,7 @@ void MR60FDA2Component::dump_config() {
|
||||
|
||||
// Initialisation functions
|
||||
void MR60FDA2Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up MR60FDA2...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->check_uart_settings(115200);
|
||||
|
||||
this->current_frame_locate_ = LOCATE_FRAME_HEADER;
|
||||
|
@ -8,7 +8,7 @@ namespace sen0321_sensor {
|
||||
static const char *const TAG = "sen0321_sensor.sensor";
|
||||
|
||||
void Sen0321Sensor::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sen0321...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (!this->write_byte(SENSOR_MODE_REGISTER, SENSOR_MODE_AUTO)) {
|
||||
ESP_LOGW(TAG, "Error setting measurement mode.");
|
||||
this->mark_failed();
|
||||
|
@ -30,7 +30,7 @@ static const int8_t SEN5X_MIN_INDEX_VALUE = 1 * SEN5X_INDEX_SCALE_FACTOR; //
|
||||
static const int16_t SEN5X_MAX_INDEX_VALUE = 500 * SEN5X_INDEX_SCALE_FACTOR; // must be adjusted by the scale factor
|
||||
|
||||
void SEN5XComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sen5x...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// the sensor needs 1000 ms to enter the idle state
|
||||
this->set_timeout(1000, [this]() {
|
||||
|
@ -11,7 +11,7 @@ static const uint16_t SFA30_CMD_START_CONTINUOUS_MEASUREMENTS = 0x0006;
|
||||
static const uint16_t SFA30_CMD_READ_MEASUREMENT = 0x0327;
|
||||
|
||||
void SFA30Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sfa30...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Serial Number identification
|
||||
uint16_t raw_device_marking[16];
|
||||
|
@ -33,7 +33,7 @@ const uint32_t SHORTEST_BASELINE_STORE_INTERVAL = 3600;
|
||||
const uint32_t MAXIMUM_STORAGE_DIFF = 50;
|
||||
|
||||
void SGP30Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SGP30...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Serial Number identification
|
||||
uint16_t raw_serial_number[3];
|
||||
|
@ -9,7 +9,7 @@ namespace sgp4x {
|
||||
static const char *const TAG = "sgp4x";
|
||||
|
||||
void SGP4xComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SGP4x...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Serial Number identification
|
||||
uint16_t raw_serial_number[3];
|
||||
|
@ -25,7 +25,7 @@ static const uint16_t SHT3XD_COMMAND_POLLING_H = 0x2400;
|
||||
static const uint16_t SHT3XD_COMMAND_FETCH_DATA = 0xE000;
|
||||
|
||||
void SHT3XDComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SHT3xD...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint16_t raw_serial_number[2];
|
||||
if (!this->get_register(SHT3XD_COMMAND_READ_SERIAL_NUMBER_CLOCK_STRETCHING, raw_serial_number, 2)) {
|
||||
this->error_code_ = READ_SERIAL_STRETCHED_FAILED;
|
||||
|
@ -18,7 +18,7 @@ void SHT4XComponent::start_heater_() {
|
||||
}
|
||||
|
||||
void SHT4XComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sht4x...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
auto err = this->write(nullptr, 0);
|
||||
if (err != i2c::ERROR_OK) {
|
||||
|
@ -25,7 +25,7 @@ inline const char *to_string(SHTCXType type) {
|
||||
}
|
||||
|
||||
void SHTCXComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SHTCx...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->wake_up();
|
||||
this->soft_reset();
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace sm16716 {
|
||||
static const char *const TAG = "sm16716";
|
||||
|
||||
void SM16716::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SM16716OutputComponent...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->data_pin_->setup();
|
||||
this->data_pin_->digital_write(false);
|
||||
this->clock_pin_->setup();
|
||||
|
@ -20,7 +20,7 @@ static const uint8_t SM2135_RGB = 0x00; // RGB channel
|
||||
static const uint8_t SM2135_CW = 0x80; // CW channel (Chip default)
|
||||
|
||||
void SM2135::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SM2135OutputComponent...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->data_pin_->setup();
|
||||
this->data_pin_->digital_write(false);
|
||||
this->data_pin_->pin_mode(gpio::FLAG_OUTPUT);
|
||||
|
@ -7,7 +7,7 @@ namespace sm2235 {
|
||||
static const char *const TAG = "sm2235";
|
||||
|
||||
void SM2235::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sm2235 Output Component...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->data_pin_->setup();
|
||||
this->data_pin_->digital_write(true);
|
||||
this->clock_pin_->setup();
|
||||
|
@ -7,7 +7,7 @@ namespace sm2335 {
|
||||
static const char *const TAG = "sm2335";
|
||||
|
||||
void SM2335::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sm2335 Output Component...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->data_pin_->setup();
|
||||
this->data_pin_->digital_write(true);
|
||||
this->clock_pin_->setup();
|
||||
|
@ -7,8 +7,7 @@ namespace sn74hc165 {
|
||||
static const char *const TAG = "sn74hc165";
|
||||
|
||||
void SN74HC165Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SN74HC165...");
|
||||
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
// initialize pins
|
||||
this->clock_pin_->setup();
|
||||
this->data_pin_->setup();
|
||||
|
@ -7,8 +7,7 @@ namespace sn74hc595 {
|
||||
static const char *const TAG = "sn74hc595";
|
||||
|
||||
void SN74HC595Component::pre_setup_() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SN74HC595...");
|
||||
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (this->have_oe_pin_) { // disable output
|
||||
this->oe_pin_->setup();
|
||||
this->oe_pin_->digital_write(true);
|
||||
|
@ -15,7 +15,7 @@ namespace sntp {
|
||||
static const char *const TAG = "sntp";
|
||||
|
||||
void SNTPComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SNTP...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
#if defined(USE_ESP_IDF)
|
||||
if (esp_sntp_enabled()) {
|
||||
esp_sntp_stop();
|
||||
|
@ -22,7 +22,7 @@ static const size_t SERIAL_NUMBER_LENGTH = 8;
|
||||
static const uint8_t MAX_SKIPPED_DATA_CYCLES_BEFORE_ERROR = 5;
|
||||
|
||||
void SPS30Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up sps30...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->write_command(SPS30_CMD_SOFT_RESET);
|
||||
/// Deferred Sensor initialization
|
||||
this->set_timeout(500, [this]() {
|
||||
|
@ -7,7 +7,7 @@ namespace ssd1306_i2c {
|
||||
static const char *const TAG = "ssd1306_i2c";
|
||||
|
||||
void I2CSSD1306::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up I2C SSD1306...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->init_reset_();
|
||||
|
||||
auto err = this->write(nullptr, 0);
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1306_spi {
|
||||
static const char *const TAG = "ssd1306_spi";
|
||||
|
||||
void SPISSD1306::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1306...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1322_spi {
|
||||
static const char *const TAG = "ssd1322_spi";
|
||||
|
||||
void SPISSD1322::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1322...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
if (this->cs_)
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1325_spi {
|
||||
static const char *const TAG = "ssd1325_spi";
|
||||
|
||||
void SPISSD1325::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1325...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
if (this->cs_)
|
||||
|
@ -7,7 +7,7 @@ namespace ssd1327_i2c {
|
||||
static const char *const TAG = "ssd1327_i2c";
|
||||
|
||||
void I2CSSD1327::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up I2C SSD1327...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->init_reset_();
|
||||
|
||||
auto err = this->write(nullptr, 0);
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1327_spi {
|
||||
static const char *const TAG = "ssd1327_spi";
|
||||
|
||||
void SPISSD1327::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1327...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
if (this->cs_)
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1331_spi {
|
||||
static const char *const TAG = "ssd1331_spi";
|
||||
|
||||
void SPISSD1331::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1331...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
if (this->cs_)
|
||||
|
@ -8,7 +8,7 @@ namespace ssd1351_spi {
|
||||
static const char *const TAG = "ssd1351_spi";
|
||||
|
||||
void SPISSD1351::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1351...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
if (this->cs_)
|
||||
|
@ -7,7 +7,7 @@ namespace st7567_i2c {
|
||||
static const char *const TAG = "st7567_i2c";
|
||||
|
||||
void I2CST7567::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up I2C ST7567 display...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->init_reset_();
|
||||
|
||||
auto err = this->write(nullptr, 0);
|
||||
|
@ -7,7 +7,7 @@ namespace st7567_spi {
|
||||
static const char *const TAG = "st7567_spi";
|
||||
|
||||
void SPIST7567::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI ST7567 display...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
this->dc_pin_->setup();
|
||||
if (this->cs_)
|
||||
|
@ -233,7 +233,7 @@ ST7735::ST7735(ST7735Model model, int width, int height, int colstart, int rowst
|
||||
height_(height) {}
|
||||
|
||||
void ST7735::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ST7735...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->spi_setup();
|
||||
|
||||
this->dc_pin_->setup(); // OUTPUT
|
||||
|
@ -8,7 +8,7 @@ static const char *const TAG = "st7789v";
|
||||
static const size_t TEMP_BUFFER_SIZE = 128;
|
||||
|
||||
void ST7789V::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SPI ST7789V...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
#ifdef USE_POWER_SUPPLY
|
||||
this->power_.request();
|
||||
// the PowerSupply component takes care of post turn-on delay
|
||||
|
@ -32,7 +32,7 @@ static const uint8_t LCD_LINE2 = 0x88;
|
||||
static const uint8_t LCD_LINE3 = 0x98;
|
||||
|
||||
void ST7920::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ST7920...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->dump_config();
|
||||
this->spi_setup();
|
||||
this->init_internal_(this->get_buffer_length_());
|
||||
|
@ -53,7 +53,7 @@ void StatusLEDLightOutput::write_state(light::LightState *state) {
|
||||
}
|
||||
|
||||
void StatusLEDLightOutput::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Status LED...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
if (this->pin_ != nullptr) {
|
||||
this->pin_->setup();
|
||||
|
@ -11,7 +11,7 @@ StatusLED *global_status_led = nullptr; // NOLINT(cppcoreguidelines-avoid-non-c
|
||||
|
||||
StatusLED::StatusLED(GPIOPin *pin) : pin_(pin) { global_status_led = this; }
|
||||
void StatusLED::pre_setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Status LED...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->pin_->setup();
|
||||
this->pin_->digital_write(false);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ static const uint16_t STS3X_COMMAND_HEATER_DISABLE = 0x3066;
|
||||
static const uint16_t STS3X_COMMAND_FETCH_DATA = 0xE000;
|
||||
|
||||
void STS3XComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up STS3x...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (!this->write_command(STS3X_COMMAND_READ_SERIAL_NUMBER)) {
|
||||
this->mark_failed();
|
||||
return;
|
||||
|
@ -8,7 +8,7 @@ namespace sx1509 {
|
||||
static const char *const TAG = "sx1509";
|
||||
|
||||
void SX1509Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up SX1509Component...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
ESP_LOGV(TAG, " Resetting devices...");
|
||||
if (!this->write_byte(REG_RESET, 0x12)) {
|
||||
|
@ -15,7 +15,7 @@ static const uint8_t TC74_DATA_READY_MASK = 0x40;
|
||||
// It is possible the "Data Ready" bit will not be set if the TC74 has not been powered on for at least 250ms, so it not
|
||||
// being set does not constitute a failure.
|
||||
void TC74Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TC74...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t config_reg;
|
||||
if (this->read_register(TC74_REGISTER_CONFIGURATION, &config_reg, 1) != i2c::ERROR_OK) {
|
||||
this->mark_failed();
|
||||
|
@ -24,7 +24,7 @@ i2c::ErrorCode TCA9548AChannel::writev(uint8_t address, i2c::WriteBuffer *buffer
|
||||
}
|
||||
|
||||
void TCA9548AComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TCA9548A...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t status = 0;
|
||||
if (this->read(&status, 1) != i2c::ERROR_OK) {
|
||||
ESP_LOGE(TAG, "TCA9548A failed");
|
||||
|
@ -16,7 +16,7 @@ namespace tca9555 {
|
||||
static const char *const TAG = "tca9555";
|
||||
|
||||
void TCA9555Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TCA9555...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
if (!this->read_gpio_modes_()) {
|
||||
this->mark_failed();
|
||||
return;
|
||||
|
@ -18,7 +18,7 @@ static const uint8_t TCS34725_REGISTER_ENABLE = TCS34725_COMMAND_BIT | 0x00;
|
||||
static const uint8_t TCS34725_REGISTER_CRGBDATAL = TCS34725_COMMAND_BIT | 0x14;
|
||||
|
||||
void TCS34725Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TCS34725...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t id;
|
||||
if (this->read_register(TCS34725_REGISTER_ID, &id, 1) != i2c::ERROR_OK) {
|
||||
this->mark_failed();
|
||||
|
@ -7,7 +7,7 @@ namespace tee501 {
|
||||
static const char *const TAG = "tee501";
|
||||
|
||||
void TEE501Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TEE501...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t address[] = {0x70, 0x29};
|
||||
this->write(address, 2, false);
|
||||
uint8_t identification[9];
|
||||
|
@ -16,7 +16,7 @@ enum ErrorCode {
|
||||
};
|
||||
|
||||
void TEM3200Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TEM3200...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
uint8_t status(NONE);
|
||||
uint16_t raw_temperature(0);
|
||||
|
@ -71,7 +71,7 @@ void TemplateAlarmControlPanel::dump_config() {
|
||||
}
|
||||
|
||||
void TemplateAlarmControlPanel::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Template AlarmControlPanel '%s'...", this->name_.c_str());
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
|
||||
switch (this->restore_mode_) {
|
||||
case ALARM_CONTROL_PANEL_ALWAYS_DISARMED:
|
||||
this->current_state_ = ACP_STATE_DISARMED;
|
||||
|
@ -16,7 +16,7 @@ TemplateCover::TemplateCover()
|
||||
position_trigger_(new Trigger<float>()),
|
||||
tilt_trigger_(new Trigger<float>()) {}
|
||||
void TemplateCover::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up template cover '%s'...", this->name_.c_str());
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
|
||||
switch (this->restore_mode_) {
|
||||
case COVER_NO_RESTORE:
|
||||
break;
|
||||
|
@ -12,9 +12,8 @@ void TemplateText::setup() {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string value;
|
||||
ESP_LOGD(TAG, "Setting up Template Text Input");
|
||||
value = this->initial_value_;
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
|
||||
std::string value = this->initial_value_;
|
||||
if (!this->pref_) {
|
||||
ESP_LOGD(TAG, "State from initial: %s", value.c_str());
|
||||
} else {
|
||||
|
@ -16,7 +16,7 @@ TemplateValve::TemplateValve()
|
||||
position_trigger_(new Trigger<float>()) {}
|
||||
|
||||
void TemplateValve::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up template valve '%s'...", this->name_.c_str());
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
|
||||
switch (this->restore_mode_) {
|
||||
case VALVE_NO_RESTORE:
|
||||
break;
|
||||
|
@ -71,7 +71,7 @@ static const uint8_t LDR_PWM = 0x02;
|
||||
static const uint8_t LDR_GRPPWM = 0x03;
|
||||
|
||||
void TLC59208FOutput::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TLC59208FOutputComponent...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
ESP_LOGV(TAG, " Resetting all devices on the bus...");
|
||||
|
||||
|
@ -29,7 +29,7 @@ const uint8_t TM1621_DIGIT_ROW[2][12] = {{0x5F, 0x50, 0x3D, 0x79, 0x72, 0x6B, 0x
|
||||
{0xF5, 0x05, 0xB6, 0x97, 0x47, 0xD3, 0xF3, 0x85, 0xF7, 0xD7, 0x02, 0x00}};
|
||||
|
||||
void TM1621Display::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TM1621...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
this->cs_pin_->setup(); // OUTPUT
|
||||
this->cs_pin_->digital_write(true);
|
||||
|
@ -125,7 +125,7 @@ const uint8_t TM1637_ASCII_TO_RAW[] PROGMEM = {
|
||||
0b01100011, // '~', ord 0x7E (degree symbol)
|
||||
};
|
||||
void TM1637Display::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TM1637...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
this->clk_pin_->setup(); // OUTPUT
|
||||
this->clk_pin_->digital_write(false); // LOW
|
||||
|
@ -17,7 +17,7 @@ static const uint8_t TM1651_BRIGHTNESS_MEDIUM_HW = 2;
|
||||
static const uint8_t TM1651_BRIGHTNESS_HIGH_HW = 7;
|
||||
|
||||
void TM1651Display::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TM1651...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
uint8_t clk = clk_pin_->get_pin();
|
||||
uint8_t dio = dio_pin_->get_pin();
|
||||
|
@ -15,7 +15,7 @@ static const uint8_t TMP102_REGISTER_HIGH_LIMIT = 0x03;
|
||||
|
||||
static const float TMP102_CONVERSION_FACTOR = 0.0625;
|
||||
|
||||
void TMP102Component::setup() { ESP_LOGCONFIG(TAG, "Setting up TMP102..."); }
|
||||
void TMP102Component::setup() { ESP_LOGCONFIG(TAG, "Running setup"); }
|
||||
|
||||
void TMP102Component::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "TMP102:");
|
||||
|
@ -26,7 +26,7 @@ void TMP117Component::update() {
|
||||
}
|
||||
}
|
||||
void TMP117Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TMP117...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
if (!this->write_config_(this->config_)) {
|
||||
this->mark_failed();
|
||||
|
@ -15,7 +15,7 @@ static const uint8_t TSL2561_REGISTER_DATA_0 = 0x0C;
|
||||
static const uint8_t TSL2561_REGISTER_DATA_1 = 0x0E;
|
||||
|
||||
void TSL2561Sensor::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TSL2561...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t id;
|
||||
if (!this->tsl2561_read_byte(TSL2561_REGISTER_ID, &id)) {
|
||||
this->mark_failed();
|
||||
|
@ -47,7 +47,7 @@ struct TT21100TouchReport {
|
||||
float TT21100Touchscreen::get_setup_priority() const { return setup_priority::HARDWARE - 1.0f; }
|
||||
|
||||
void TT21100Touchscreen::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up TT21100 Touchscreen...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Register interrupt pin
|
||||
if (this->interrupt_pin_ != nullptr) {
|
||||
|
@ -7,7 +7,7 @@ namespace ttp229_bsf {
|
||||
static const char *const TAG = "ttp229_bsf";
|
||||
|
||||
void TTP229BSFComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ttp229_bsf... ");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->sdo_pin_->setup();
|
||||
this->scl_pin_->setup();
|
||||
this->scl_pin_->digital_write(true);
|
||||
|
@ -7,7 +7,7 @@ namespace ttp229_lsf {
|
||||
static const char *const TAG = "ttp229_lsf";
|
||||
|
||||
void TTP229LSFComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ttp229...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
uint8_t data[2];
|
||||
if (this->read(data, 2) != i2c::ERROR_OK) {
|
||||
this->error_code_ = COMMUNICATION_FAILED;
|
||||
|
@ -15,7 +15,7 @@ static const char *const DIRECTIONS[] = {"N", "NNE", "NE", "ENE", "E", "ESE", "S
|
||||
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"};
|
||||
|
||||
void Tx20Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Tx20");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->pin_->setup();
|
||||
|
||||
this->store_.buffer = new uint16_t[MAX_BUFFER_SIZE];
|
||||
|
@ -74,7 +74,7 @@ uint32_t ESP32ArduinoUARTComponent::get_config() {
|
||||
}
|
||||
|
||||
void ESP32ArduinoUARTComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up UART...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
// Use Arduino HardwareSerial UARTs if all used pins match the ones
|
||||
// preconfigured by the platform. For example if RX disabled but TX pin
|
||||
// is 1 we still want to use Serial.
|
||||
|
@ -56,7 +56,7 @@ uint32_t ESP8266UartComponent::get_config() {
|
||||
}
|
||||
|
||||
void ESP8266UartComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up UART bus...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
// Use Arduino HardwareSerial UARTs if all used pins match the ones
|
||||
// preconfigured by the platform. For example if RX disabled but TX pin
|
||||
// is 1 we still want to use Serial.
|
||||
|
@ -85,12 +85,12 @@ void IDFUARTComponent::setup() {
|
||||
#endif // USE_LOGGER
|
||||
|
||||
if (next_uart_num >= SOC_UART_NUM) {
|
||||
ESP_LOGW(TAG, "Maximum number of UART components created already.");
|
||||
ESP_LOGW(TAG, "Maximum number of UART components created already");
|
||||
this->mark_failed();
|
||||
return;
|
||||
}
|
||||
this->uart_num_ = static_cast<uart_port_t>(next_uart_num++);
|
||||
ESP_LOGCONFIG(TAG, "Setting up UART %u...", this->uart_num_);
|
||||
ESP_LOGCONFIG(TAG, "Running setup for UART %u", this->uart_num_);
|
||||
|
||||
this->lock_ = xSemaphoreCreateMutex();
|
||||
|
||||
|
@ -46,7 +46,7 @@ uint16_t LibreTinyUARTComponent::get_config() {
|
||||
}
|
||||
|
||||
void LibreTinyUARTComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up UART...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
int8_t tx_pin = tx_pin_ == nullptr ? -1 : tx_pin_->get_pin();
|
||||
int8_t rx_pin = rx_pin_ == nullptr ? -1 : rx_pin_->get_pin();
|
||||
|
@ -52,7 +52,7 @@ uint16_t RP2040UartComponent::get_config() {
|
||||
}
|
||||
|
||||
void RP2040UartComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up UART bus...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
uint16_t config = get_config();
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace ufire_ec {
|
||||
static const char *const TAG = "ufire_ec";
|
||||
|
||||
void UFireECComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up uFire_ec...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
uint8_t version;
|
||||
if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) {
|
||||
|
@ -9,7 +9,7 @@ namespace ufire_ise {
|
||||
static const char *const TAG = "ufire_ise";
|
||||
|
||||
void UFireISEComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up uFire_ise...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
uint8_t version;
|
||||
if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) {
|
||||
|
@ -8,7 +8,7 @@ namespace ultrasonic {
|
||||
static const char *const TAG = "ultrasonic.sensor";
|
||||
|
||||
void UltrasonicSensorComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up Ultrasonic Sensor...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->trigger_pin_->setup();
|
||||
this->trigger_pin_->digital_write(false);
|
||||
this->echo_pin_->setup();
|
||||
|
@ -10,7 +10,7 @@ static const char *const TAG = "veml3235.sensor";
|
||||
void VEML3235Sensor::setup() {
|
||||
uint8_t device_id[] = {0, 0};
|
||||
|
||||
ESP_LOGCONFIG(TAG, "Setting up VEML3235 '%s'...", this->name_.c_str());
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
|
||||
|
||||
if (!this->refresh_config_reg()) {
|
||||
ESP_LOGE(TAG, "Unable to write configuration");
|
||||
|
@ -78,7 +78,7 @@ static const char *get_gain_str(Gain gain) {
|
||||
}
|
||||
|
||||
void VEML7700Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up VEML7700/6030...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
auto err = this->configure_();
|
||||
if (err != i2c::ERROR_OK) {
|
||||
|
@ -235,7 +235,7 @@ std::string WebServer::get_config_json() {
|
||||
}
|
||||
|
||||
void WebServer::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up web server...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->setup_controller(this->include_internal_);
|
||||
this->base_->init();
|
||||
|
||||
|
@ -142,7 +142,7 @@ void WeikaiRegisterI2C::write_fifo(uint8_t *data, size_t length) {
|
||||
void WeikaiComponentI2C::setup() {
|
||||
// before any manipulation we store the address to base_address_ for future use
|
||||
this->base_address_ = this->address_;
|
||||
ESP_LOGCONFIG(TAG, "Setting up wk2168_i2c: %s with %d UARTs at @%02X ...", this->get_name(), this->children_.size(),
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s' with %d UARTs at @%02X", this->get_name(), this->children_.size(),
|
||||
this->base_address_);
|
||||
|
||||
// enable all channels
|
||||
|
@ -156,7 +156,7 @@ void WeikaiRegisterSPI::write_fifo(uint8_t *data, size_t length) {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void WeikaiComponentSPI::setup() {
|
||||
using namespace weikai;
|
||||
ESP_LOGCONFIG(TAG, "Setting up wk2168_spi: %s with %d UARTs...", this->get_name(), this->children_.size());
|
||||
ESP_LOGCONFIG(TAG, "Running setup for '%s' with %d UARTs...", this->get_name(), this->children_.size());
|
||||
this->spi_setup();
|
||||
// enable all channels
|
||||
this->reg(WKREG_GENA, 0) = GENA_C1EN | GENA_C2EN | GENA_C3EN | GENA_C4EN;
|
||||
|
@ -45,7 +45,7 @@ static const char *const TAG = "wifi";
|
||||
float WiFiComponent::get_setup_priority() const { return setup_priority::WIFI; }
|
||||
|
||||
void WiFiComponent::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up WiFi...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
this->wifi_pre_setup_();
|
||||
if (this->enable_on_boot_) {
|
||||
this->start();
|
||||
|
@ -34,7 +34,7 @@ void X9cOutput::trim_value(int change_amount) {
|
||||
}
|
||||
|
||||
void X9cOutput::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up X9C Potentiometer with initial value of %f", this->initial_value_);
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
this->inc_pin_->get_pin();
|
||||
this->inc_pin_->setup();
|
||||
|
@ -7,7 +7,7 @@ namespace xl9535 {
|
||||
static const char *const TAG = "xl9535";
|
||||
|
||||
void XL9535Component::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up XL9535...");
|
||||
ESP_LOGCONFIG(TAG, "Running setup");
|
||||
|
||||
// Check to see if the device can read from the register
|
||||
uint8_t port = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user