Streamline setup() logging (s, t, u, v, w, x, y, z) (#8930)

This commit is contained in:
Keith Burzinski 2025-05-28 14:28:41 -05:00 committed by GitHub
parent d99e3237f9
commit 8eac859bab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
74 changed files with 76 additions and 79 deletions

View File

@ -26,7 +26,7 @@ static const uint16_t SCD30_CMD_TEMPERATURE_OFFSET = 0x5403;
static const uint16_t SCD30_CMD_SOFT_RESET = 0xD304; static const uint16_t SCD30_CMD_SOFT_RESET = 0xD304;
void SCD30Component::setup() { void SCD30Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up scd30..."); ESP_LOGCONFIG(TAG, "Running setup");
#ifdef USE_ESP8266 #ifdef USE_ESP8266
Wire.setClockStretchLimit(150000); Wire.setClockStretchLimit(150000);

View File

@ -27,7 +27,7 @@ static const uint16_t SCD41_ID = 0x1408;
static const uint16_t SCD40_ID = 0x440; static const uint16_t SCD40_ID = 0x440;
void SCD4XComponent::setup() { void SCD4XComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up scd4x..."); ESP_LOGCONFIG(TAG, "Running setup");
// the sensor needs 1000 ms to enter the idle state // the sensor needs 1000 ms to enter the idle state
this->set_timeout(1000, [this]() { this->set_timeout(1000, [this]() {
this->status_clear_error(); this->status_clear_error();

View File

@ -61,7 +61,7 @@ void MR24HPC1Component::dump_config() {
// Initialisation functions // Initialisation functions
void MR24HPC1Component::setup() { void MR24HPC1Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up MR24HPC1..."); ESP_LOGCONFIG(TAG, "Running setup");
this->check_uart_settings(115200); this->check_uart_settings(115200);
if (this->custom_mode_number_ != nullptr) { if (this->custom_mode_number_ != nullptr) {

View File

@ -30,7 +30,7 @@ void MR60FDA2Component::dump_config() {
// Initialisation functions // Initialisation functions
void MR60FDA2Component::setup() { void MR60FDA2Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up MR60FDA2..."); ESP_LOGCONFIG(TAG, "Running setup");
this->check_uart_settings(115200); this->check_uart_settings(115200);
this->current_frame_locate_ = LOCATE_FRAME_HEADER; this->current_frame_locate_ = LOCATE_FRAME_HEADER;

View File

@ -8,7 +8,7 @@ namespace sen0321_sensor {
static const char *const TAG = "sen0321_sensor.sensor"; static const char *const TAG = "sen0321_sensor.sensor";
void Sen0321Sensor::setup() { void Sen0321Sensor::setup() {
ESP_LOGCONFIG(TAG, "Setting up sen0321..."); ESP_LOGCONFIG(TAG, "Running setup");
if (!this->write_byte(SENSOR_MODE_REGISTER, SENSOR_MODE_AUTO)) { if (!this->write_byte(SENSOR_MODE_REGISTER, SENSOR_MODE_AUTO)) {
ESP_LOGW(TAG, "Error setting measurement mode."); ESP_LOGW(TAG, "Error setting measurement mode.");
this->mark_failed(); this->mark_failed();

View File

@ -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 static const int16_t SEN5X_MAX_INDEX_VALUE = 500 * SEN5X_INDEX_SCALE_FACTOR; // must be adjusted by the scale factor
void SEN5XComponent::setup() { void SEN5XComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up sen5x..."); ESP_LOGCONFIG(TAG, "Running setup");
// the sensor needs 1000 ms to enter the idle state // the sensor needs 1000 ms to enter the idle state
this->set_timeout(1000, [this]() { this->set_timeout(1000, [this]() {

View File

@ -11,7 +11,7 @@ static const uint16_t SFA30_CMD_START_CONTINUOUS_MEASUREMENTS = 0x0006;
static const uint16_t SFA30_CMD_READ_MEASUREMENT = 0x0327; static const uint16_t SFA30_CMD_READ_MEASUREMENT = 0x0327;
void SFA30Component::setup() { void SFA30Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up sfa30..."); ESP_LOGCONFIG(TAG, "Running setup");
// Serial Number identification // Serial Number identification
uint16_t raw_device_marking[16]; uint16_t raw_device_marking[16];

View File

@ -33,7 +33,7 @@ const uint32_t SHORTEST_BASELINE_STORE_INTERVAL = 3600;
const uint32_t MAXIMUM_STORAGE_DIFF = 50; const uint32_t MAXIMUM_STORAGE_DIFF = 50;
void SGP30Component::setup() { void SGP30Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up SGP30..."); ESP_LOGCONFIG(TAG, "Running setup");
// Serial Number identification // Serial Number identification
uint16_t raw_serial_number[3]; uint16_t raw_serial_number[3];

View File

@ -9,7 +9,7 @@ namespace sgp4x {
static const char *const TAG = "sgp4x"; static const char *const TAG = "sgp4x";
void SGP4xComponent::setup() { void SGP4xComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up SGP4x..."); ESP_LOGCONFIG(TAG, "Running setup");
// Serial Number identification // Serial Number identification
uint16_t raw_serial_number[3]; uint16_t raw_serial_number[3];

View File

@ -25,7 +25,7 @@ static const uint16_t SHT3XD_COMMAND_POLLING_H = 0x2400;
static const uint16_t SHT3XD_COMMAND_FETCH_DATA = 0xE000; static const uint16_t SHT3XD_COMMAND_FETCH_DATA = 0xE000;
void SHT3XDComponent::setup() { void SHT3XDComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up SHT3xD..."); ESP_LOGCONFIG(TAG, "Running setup");
uint16_t raw_serial_number[2]; uint16_t raw_serial_number[2];
if (!this->get_register(SHT3XD_COMMAND_READ_SERIAL_NUMBER_CLOCK_STRETCHING, 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; this->error_code_ = READ_SERIAL_STRETCHED_FAILED;

View File

@ -18,7 +18,7 @@ void SHT4XComponent::start_heater_() {
} }
void SHT4XComponent::setup() { void SHT4XComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up sht4x..."); ESP_LOGCONFIG(TAG, "Running setup");
auto err = this->write(nullptr, 0); auto err = this->write(nullptr, 0);
if (err != i2c::ERROR_OK) { if (err != i2c::ERROR_OK) {

View File

@ -25,7 +25,7 @@ inline const char *to_string(SHTCXType type) {
} }
void SHTCXComponent::setup() { void SHTCXComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up SHTCx..."); ESP_LOGCONFIG(TAG, "Running setup");
this->wake_up(); this->wake_up();
this->soft_reset(); this->soft_reset();

View File

@ -7,7 +7,7 @@ namespace sm16716 {
static const char *const TAG = "sm16716"; static const char *const TAG = "sm16716";
void SM16716::setup() { void SM16716::setup() {
ESP_LOGCONFIG(TAG, "Setting up SM16716OutputComponent..."); ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(false); this->data_pin_->digital_write(false);
this->clock_pin_->setup(); this->clock_pin_->setup();

View File

@ -20,7 +20,7 @@ static const uint8_t SM2135_RGB = 0x00; // RGB channel
static const uint8_t SM2135_CW = 0x80; // CW channel (Chip default) static const uint8_t SM2135_CW = 0x80; // CW channel (Chip default)
void SM2135::setup() { void SM2135::setup() {
ESP_LOGCONFIG(TAG, "Setting up SM2135OutputComponent..."); ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(false); this->data_pin_->digital_write(false);
this->data_pin_->pin_mode(gpio::FLAG_OUTPUT); this->data_pin_->pin_mode(gpio::FLAG_OUTPUT);

View File

@ -7,7 +7,7 @@ namespace sm2235 {
static const char *const TAG = "sm2235"; static const char *const TAG = "sm2235";
void SM2235::setup() { void SM2235::setup() {
ESP_LOGCONFIG(TAG, "Setting up sm2235 Output Component..."); ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(true); this->data_pin_->digital_write(true);
this->clock_pin_->setup(); this->clock_pin_->setup();

View File

@ -7,7 +7,7 @@ namespace sm2335 {
static const char *const TAG = "sm2335"; static const char *const TAG = "sm2335";
void SM2335::setup() { void SM2335::setup() {
ESP_LOGCONFIG(TAG, "Setting up sm2335 Output Component..."); ESP_LOGCONFIG(TAG, "Running setup");
this->data_pin_->setup(); this->data_pin_->setup();
this->data_pin_->digital_write(true); this->data_pin_->digital_write(true);
this->clock_pin_->setup(); this->clock_pin_->setup();

View File

@ -7,8 +7,7 @@ namespace sn74hc165 {
static const char *const TAG = "sn74hc165"; static const char *const TAG = "sn74hc165";
void SN74HC165Component::setup() { void SN74HC165Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up SN74HC165..."); ESP_LOGCONFIG(TAG, "Running setup");
// initialize pins // initialize pins
this->clock_pin_->setup(); this->clock_pin_->setup();
this->data_pin_->setup(); this->data_pin_->setup();

View File

@ -7,8 +7,7 @@ namespace sn74hc595 {
static const char *const TAG = "sn74hc595"; static const char *const TAG = "sn74hc595";
void SN74HC595Component::pre_setup_() { void SN74HC595Component::pre_setup_() {
ESP_LOGCONFIG(TAG, "Setting up SN74HC595..."); ESP_LOGCONFIG(TAG, "Running setup");
if (this->have_oe_pin_) { // disable output if (this->have_oe_pin_) { // disable output
this->oe_pin_->setup(); this->oe_pin_->setup();
this->oe_pin_->digital_write(true); this->oe_pin_->digital_write(true);

View File

@ -15,7 +15,7 @@ namespace sntp {
static const char *const TAG = "sntp"; static const char *const TAG = "sntp";
void SNTPComponent::setup() { void SNTPComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up SNTP..."); ESP_LOGCONFIG(TAG, "Running setup");
#if defined(USE_ESP_IDF) #if defined(USE_ESP_IDF)
if (esp_sntp_enabled()) { if (esp_sntp_enabled()) {
esp_sntp_stop(); esp_sntp_stop();

View File

@ -22,7 +22,7 @@ static const size_t SERIAL_NUMBER_LENGTH = 8;
static const uint8_t MAX_SKIPPED_DATA_CYCLES_BEFORE_ERROR = 5; static const uint8_t MAX_SKIPPED_DATA_CYCLES_BEFORE_ERROR = 5;
void SPS30Component::setup() { void SPS30Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up sps30..."); ESP_LOGCONFIG(TAG, "Running setup");
this->write_command(SPS30_CMD_SOFT_RESET); this->write_command(SPS30_CMD_SOFT_RESET);
/// Deferred Sensor initialization /// Deferred Sensor initialization
this->set_timeout(500, [this]() { this->set_timeout(500, [this]() {

View File

@ -7,7 +7,7 @@ namespace ssd1306_i2c {
static const char *const TAG = "ssd1306_i2c"; static const char *const TAG = "ssd1306_i2c";
void I2CSSD1306::setup() { void I2CSSD1306::setup() {
ESP_LOGCONFIG(TAG, "Setting up I2C SSD1306..."); ESP_LOGCONFIG(TAG, "Running setup");
this->init_reset_(); this->init_reset_();
auto err = this->write(nullptr, 0); auto err = this->write(nullptr, 0);

View File

@ -8,7 +8,7 @@ namespace ssd1306_spi {
static const char *const TAG = "ssd1306_spi"; static const char *const TAG = "ssd1306_spi";
void SPISSD1306::setup() { void SPISSD1306::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1306..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT

View File

@ -8,7 +8,7 @@ namespace ssd1322_spi {
static const char *const TAG = "ssd1322_spi"; static const char *const TAG = "ssd1322_spi";
void SPISSD1322::setup() { void SPISSD1322::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1322..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT
if (this->cs_) if (this->cs_)

View File

@ -8,7 +8,7 @@ namespace ssd1325_spi {
static const char *const TAG = "ssd1325_spi"; static const char *const TAG = "ssd1325_spi";
void SPISSD1325::setup() { void SPISSD1325::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1325..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT
if (this->cs_) if (this->cs_)

View File

@ -7,7 +7,7 @@ namespace ssd1327_i2c {
static const char *const TAG = "ssd1327_i2c"; static const char *const TAG = "ssd1327_i2c";
void I2CSSD1327::setup() { void I2CSSD1327::setup() {
ESP_LOGCONFIG(TAG, "Setting up I2C SSD1327..."); ESP_LOGCONFIG(TAG, "Running setup");
this->init_reset_(); this->init_reset_();
auto err = this->write(nullptr, 0); auto err = this->write(nullptr, 0);

View File

@ -8,7 +8,7 @@ namespace ssd1327_spi {
static const char *const TAG = "ssd1327_spi"; static const char *const TAG = "ssd1327_spi";
void SPISSD1327::setup() { void SPISSD1327::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1327..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT
if (this->cs_) if (this->cs_)

View File

@ -8,7 +8,7 @@ namespace ssd1331_spi {
static const char *const TAG = "ssd1331_spi"; static const char *const TAG = "ssd1331_spi";
void SPISSD1331::setup() { void SPISSD1331::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1331..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT
if (this->cs_) if (this->cs_)

View File

@ -8,7 +8,7 @@ namespace ssd1351_spi {
static const char *const TAG = "ssd1351_spi"; static const char *const TAG = "ssd1351_spi";
void SPISSD1351::setup() { void SPISSD1351::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI SSD1351..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT
if (this->cs_) if (this->cs_)

View File

@ -7,7 +7,7 @@ namespace st7567_i2c {
static const char *const TAG = "st7567_i2c"; static const char *const TAG = "st7567_i2c";
void I2CST7567::setup() { void I2CST7567::setup() {
ESP_LOGCONFIG(TAG, "Setting up I2C ST7567 display..."); ESP_LOGCONFIG(TAG, "Running setup");
this->init_reset_(); this->init_reset_();
auto err = this->write(nullptr, 0); auto err = this->write(nullptr, 0);

View File

@ -7,7 +7,7 @@ namespace st7567_spi {
static const char *const TAG = "st7567_spi"; static const char *const TAG = "st7567_spi";
void SPIST7567::setup() { void SPIST7567::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI ST7567 display..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); this->dc_pin_->setup();
if (this->cs_) if (this->cs_)

View File

@ -233,7 +233,7 @@ ST7735::ST7735(ST7735Model model, int width, int height, int colstart, int rowst
height_(height) {} height_(height) {}
void ST7735::setup() { void ST7735::setup() {
ESP_LOGCONFIG(TAG, "Setting up ST7735..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
this->dc_pin_->setup(); // OUTPUT this->dc_pin_->setup(); // OUTPUT

View File

@ -8,7 +8,7 @@ static const char *const TAG = "st7789v";
static const size_t TEMP_BUFFER_SIZE = 128; static const size_t TEMP_BUFFER_SIZE = 128;
void ST7789V::setup() { void ST7789V::setup() {
ESP_LOGCONFIG(TAG, "Setting up SPI ST7789V..."); ESP_LOGCONFIG(TAG, "Running setup");
#ifdef USE_POWER_SUPPLY #ifdef USE_POWER_SUPPLY
this->power_.request(); this->power_.request();
// the PowerSupply component takes care of post turn-on delay // the PowerSupply component takes care of post turn-on delay

View File

@ -32,7 +32,7 @@ static const uint8_t LCD_LINE2 = 0x88;
static const uint8_t LCD_LINE3 = 0x98; static const uint8_t LCD_LINE3 = 0x98;
void ST7920::setup() { void ST7920::setup() {
ESP_LOGCONFIG(TAG, "Setting up ST7920..."); ESP_LOGCONFIG(TAG, "Running setup");
this->dump_config(); this->dump_config();
this->spi_setup(); this->spi_setup();
this->init_internal_(this->get_buffer_length_()); this->init_internal_(this->get_buffer_length_());

View File

@ -53,7 +53,7 @@ void StatusLEDLightOutput::write_state(light::LightState *state) {
} }
void StatusLEDLightOutput::setup() { void StatusLEDLightOutput::setup() {
ESP_LOGCONFIG(TAG, "Setting up Status LED..."); ESP_LOGCONFIG(TAG, "Running setup");
if (this->pin_ != nullptr) { if (this->pin_ != nullptr) {
this->pin_->setup(); this->pin_->setup();

View File

@ -11,7 +11,7 @@ StatusLED *global_status_led = nullptr; // NOLINT(cppcoreguidelines-avoid-non-c
StatusLED::StatusLED(GPIOPin *pin) : pin_(pin) { global_status_led = this; } StatusLED::StatusLED(GPIOPin *pin) : pin_(pin) { global_status_led = this; }
void StatusLED::pre_setup() { void StatusLED::pre_setup() {
ESP_LOGCONFIG(TAG, "Setting up Status LED..."); ESP_LOGCONFIG(TAG, "Running setup");
this->pin_->setup(); this->pin_->setup();
this->pin_->digital_write(false); this->pin_->digital_write(false);
} }

View File

@ -18,7 +18,7 @@ static const uint16_t STS3X_COMMAND_HEATER_DISABLE = 0x3066;
static const uint16_t STS3X_COMMAND_FETCH_DATA = 0xE000; static const uint16_t STS3X_COMMAND_FETCH_DATA = 0xE000;
void STS3XComponent::setup() { void STS3XComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up STS3x..."); ESP_LOGCONFIG(TAG, "Running setup");
if (!this->write_command(STS3X_COMMAND_READ_SERIAL_NUMBER)) { if (!this->write_command(STS3X_COMMAND_READ_SERIAL_NUMBER)) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -8,7 +8,7 @@ namespace sx1509 {
static const char *const TAG = "sx1509"; static const char *const TAG = "sx1509";
void SX1509Component::setup() { void SX1509Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up SX1509Component..."); ESP_LOGCONFIG(TAG, "Running setup");
ESP_LOGV(TAG, " Resetting devices..."); ESP_LOGV(TAG, " Resetting devices...");
if (!this->write_byte(REG_RESET, 0x12)) { if (!this->write_byte(REG_RESET, 0x12)) {

View File

@ -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 // 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. // being set does not constitute a failure.
void TC74Component::setup() { void TC74Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TC74..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t config_reg; uint8_t config_reg;
if (this->read_register(TC74_REGISTER_CONFIGURATION, &config_reg, 1) != i2c::ERROR_OK) { if (this->read_register(TC74_REGISTER_CONFIGURATION, &config_reg, 1) != i2c::ERROR_OK) {
this->mark_failed(); this->mark_failed();

View File

@ -24,7 +24,7 @@ i2c::ErrorCode TCA9548AChannel::writev(uint8_t address, i2c::WriteBuffer *buffer
} }
void TCA9548AComponent::setup() { void TCA9548AComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up TCA9548A..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t status = 0; uint8_t status = 0;
if (this->read(&status, 1) != i2c::ERROR_OK) { if (this->read(&status, 1) != i2c::ERROR_OK) {
ESP_LOGE(TAG, "TCA9548A failed"); ESP_LOGE(TAG, "TCA9548A failed");

View File

@ -16,7 +16,7 @@ namespace tca9555 {
static const char *const TAG = "tca9555"; static const char *const TAG = "tca9555";
void TCA9555Component::setup() { void TCA9555Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TCA9555..."); ESP_LOGCONFIG(TAG, "Running setup");
if (!this->read_gpio_modes_()) { if (!this->read_gpio_modes_()) {
this->mark_failed(); this->mark_failed();
return; return;

View File

@ -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; static const uint8_t TCS34725_REGISTER_CRGBDATAL = TCS34725_COMMAND_BIT | 0x14;
void TCS34725Component::setup() { void TCS34725Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TCS34725..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t id; uint8_t id;
if (this->read_register(TCS34725_REGISTER_ID, &id, 1) != i2c::ERROR_OK) { if (this->read_register(TCS34725_REGISTER_ID, &id, 1) != i2c::ERROR_OK) {
this->mark_failed(); this->mark_failed();

View File

@ -7,7 +7,7 @@ namespace tee501 {
static const char *const TAG = "tee501"; static const char *const TAG = "tee501";
void TEE501Component::setup() { void TEE501Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TEE501..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t address[] = {0x70, 0x29}; uint8_t address[] = {0x70, 0x29};
this->write(address, 2, false); this->write(address, 2, false);
uint8_t identification[9]; uint8_t identification[9];

View File

@ -16,7 +16,7 @@ enum ErrorCode {
}; };
void TEM3200Component::setup() { void TEM3200Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TEM3200..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t status(NONE); uint8_t status(NONE);
uint16_t raw_temperature(0); uint16_t raw_temperature(0);

View File

@ -71,7 +71,7 @@ void TemplateAlarmControlPanel::dump_config() {
} }
void TemplateAlarmControlPanel::setup() { 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_) { switch (this->restore_mode_) {
case ALARM_CONTROL_PANEL_ALWAYS_DISARMED: case ALARM_CONTROL_PANEL_ALWAYS_DISARMED:
this->current_state_ = ACP_STATE_DISARMED; this->current_state_ = ACP_STATE_DISARMED;

View File

@ -16,7 +16,7 @@ TemplateCover::TemplateCover()
position_trigger_(new Trigger<float>()), position_trigger_(new Trigger<float>()),
tilt_trigger_(new Trigger<float>()) {} tilt_trigger_(new Trigger<float>()) {}
void TemplateCover::setup() { 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_) { switch (this->restore_mode_) {
case COVER_NO_RESTORE: case COVER_NO_RESTORE:
break; break;

View File

@ -12,9 +12,8 @@ void TemplateText::setup() {
return; return;
} }
std::string value; ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str());
ESP_LOGD(TAG, "Setting up Template Text Input"); std::string value = this->initial_value_;
value = this->initial_value_;
if (!this->pref_) { if (!this->pref_) {
ESP_LOGD(TAG, "State from initial: %s", value.c_str()); ESP_LOGD(TAG, "State from initial: %s", value.c_str());
} else { } else {

View File

@ -16,7 +16,7 @@ TemplateValve::TemplateValve()
position_trigger_(new Trigger<float>()) {} position_trigger_(new Trigger<float>()) {}
void TemplateValve::setup() { 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_) { switch (this->restore_mode_) {
case VALVE_NO_RESTORE: case VALVE_NO_RESTORE:
break; break;

View File

@ -71,7 +71,7 @@ static const uint8_t LDR_PWM = 0x02;
static const uint8_t LDR_GRPPWM = 0x03; static const uint8_t LDR_GRPPWM = 0x03;
void TLC59208FOutput::setup() { void TLC59208FOutput::setup() {
ESP_LOGCONFIG(TAG, "Setting up TLC59208FOutputComponent..."); ESP_LOGCONFIG(TAG, "Running setup");
ESP_LOGV(TAG, " Resetting all devices on the bus..."); ESP_LOGV(TAG, " Resetting all devices on the bus...");

View File

@ -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}}; {0xF5, 0x05, 0xB6, 0x97, 0x47, 0xD3, 0xF3, 0x85, 0xF7, 0xD7, 0x02, 0x00}};
void TM1621Display::setup() { void TM1621Display::setup() {
ESP_LOGCONFIG(TAG, "Setting up TM1621..."); ESP_LOGCONFIG(TAG, "Running setup");
this->cs_pin_->setup(); // OUTPUT this->cs_pin_->setup(); // OUTPUT
this->cs_pin_->digital_write(true); this->cs_pin_->digital_write(true);

View File

@ -125,7 +125,7 @@ const uint8_t TM1637_ASCII_TO_RAW[] PROGMEM = {
0b01100011, // '~', ord 0x7E (degree symbol) 0b01100011, // '~', ord 0x7E (degree symbol)
}; };
void TM1637Display::setup() { void TM1637Display::setup() {
ESP_LOGCONFIG(TAG, "Setting up TM1637..."); ESP_LOGCONFIG(TAG, "Running setup");
this->clk_pin_->setup(); // OUTPUT this->clk_pin_->setup(); // OUTPUT
this->clk_pin_->digital_write(false); // LOW this->clk_pin_->digital_write(false); // LOW

View File

@ -17,7 +17,7 @@ static const uint8_t TM1651_BRIGHTNESS_MEDIUM_HW = 2;
static const uint8_t TM1651_BRIGHTNESS_HIGH_HW = 7; static const uint8_t TM1651_BRIGHTNESS_HIGH_HW = 7;
void TM1651Display::setup() { void TM1651Display::setup() {
ESP_LOGCONFIG(TAG, "Setting up TM1651..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t clk = clk_pin_->get_pin(); uint8_t clk = clk_pin_->get_pin();
uint8_t dio = dio_pin_->get_pin(); uint8_t dio = dio_pin_->get_pin();

View File

@ -15,7 +15,7 @@ static const uint8_t TMP102_REGISTER_HIGH_LIMIT = 0x03;
static const float TMP102_CONVERSION_FACTOR = 0.0625; 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() { void TMP102Component::dump_config() {
ESP_LOGCONFIG(TAG, "TMP102:"); ESP_LOGCONFIG(TAG, "TMP102:");

View File

@ -26,7 +26,7 @@ void TMP117Component::update() {
} }
} }
void TMP117Component::setup() { void TMP117Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up TMP117..."); ESP_LOGCONFIG(TAG, "Running setup");
if (!this->write_config_(this->config_)) { if (!this->write_config_(this->config_)) {
this->mark_failed(); this->mark_failed();

View File

@ -15,7 +15,7 @@ static const uint8_t TSL2561_REGISTER_DATA_0 = 0x0C;
static const uint8_t TSL2561_REGISTER_DATA_1 = 0x0E; static const uint8_t TSL2561_REGISTER_DATA_1 = 0x0E;
void TSL2561Sensor::setup() { void TSL2561Sensor::setup() {
ESP_LOGCONFIG(TAG, "Setting up TSL2561..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t id; uint8_t id;
if (!this->tsl2561_read_byte(TSL2561_REGISTER_ID, &id)) { if (!this->tsl2561_read_byte(TSL2561_REGISTER_ID, &id)) {
this->mark_failed(); this->mark_failed();

View File

@ -47,7 +47,7 @@ struct TT21100TouchReport {
float TT21100Touchscreen::get_setup_priority() const { return setup_priority::HARDWARE - 1.0f; } float TT21100Touchscreen::get_setup_priority() const { return setup_priority::HARDWARE - 1.0f; }
void TT21100Touchscreen::setup() { void TT21100Touchscreen::setup() {
ESP_LOGCONFIG(TAG, "Setting up TT21100 Touchscreen..."); ESP_LOGCONFIG(TAG, "Running setup");
// Register interrupt pin // Register interrupt pin
if (this->interrupt_pin_ != nullptr) { if (this->interrupt_pin_ != nullptr) {

View File

@ -7,7 +7,7 @@ namespace ttp229_bsf {
static const char *const TAG = "ttp229_bsf"; static const char *const TAG = "ttp229_bsf";
void TTP229BSFComponent::setup() { void TTP229BSFComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up ttp229_bsf... "); ESP_LOGCONFIG(TAG, "Running setup");
this->sdo_pin_->setup(); this->sdo_pin_->setup();
this->scl_pin_->setup(); this->scl_pin_->setup();
this->scl_pin_->digital_write(true); this->scl_pin_->digital_write(true);

View File

@ -7,7 +7,7 @@ namespace ttp229_lsf {
static const char *const TAG = "ttp229_lsf"; static const char *const TAG = "ttp229_lsf";
void TTP229LSFComponent::setup() { void TTP229LSFComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up ttp229..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t data[2]; uint8_t data[2];
if (this->read(data, 2) != i2c::ERROR_OK) { if (this->read(data, 2) != i2c::ERROR_OK) {
this->error_code_ = COMMUNICATION_FAILED; this->error_code_ = COMMUNICATION_FAILED;

View File

@ -15,7 +15,7 @@ static const char *const DIRECTIONS[] = {"N", "NNE", "NE", "ENE", "E", "ESE", "S
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"}; "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"};
void Tx20Component::setup() { void Tx20Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up Tx20"); ESP_LOGCONFIG(TAG, "Running setup");
this->pin_->setup(); this->pin_->setup();
this->store_.buffer = new uint16_t[MAX_BUFFER_SIZE]; this->store_.buffer = new uint16_t[MAX_BUFFER_SIZE];

View File

@ -74,7 +74,7 @@ uint32_t ESP32ArduinoUARTComponent::get_config() {
} }
void ESP32ArduinoUARTComponent::setup() { 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 // Use Arduino HardwareSerial UARTs if all used pins match the ones
// preconfigured by the platform. For example if RX disabled but TX pin // preconfigured by the platform. For example if RX disabled but TX pin
// is 1 we still want to use Serial. // is 1 we still want to use Serial.

View File

@ -56,7 +56,7 @@ uint32_t ESP8266UartComponent::get_config() {
} }
void ESP8266UartComponent::setup() { 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 // Use Arduino HardwareSerial UARTs if all used pins match the ones
// preconfigured by the platform. For example if RX disabled but TX pin // preconfigured by the platform. For example if RX disabled but TX pin
// is 1 we still want to use Serial. // is 1 we still want to use Serial.

View File

@ -85,12 +85,12 @@ void IDFUARTComponent::setup() {
#endif // USE_LOGGER #endif // USE_LOGGER
if (next_uart_num >= SOC_UART_NUM) { 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(); this->mark_failed();
return; return;
} }
this->uart_num_ = static_cast<uart_port_t>(next_uart_num++); 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(); this->lock_ = xSemaphoreCreateMutex();

View File

@ -46,7 +46,7 @@ uint16_t LibreTinyUARTComponent::get_config() {
} }
void LibreTinyUARTComponent::setup() { 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 tx_pin = tx_pin_ == nullptr ? -1 : tx_pin_->get_pin();
int8_t rx_pin = rx_pin_ == nullptr ? -1 : rx_pin_->get_pin(); int8_t rx_pin = rx_pin_ == nullptr ? -1 : rx_pin_->get_pin();

View File

@ -52,7 +52,7 @@ uint16_t RP2040UartComponent::get_config() {
} }
void RP2040UartComponent::setup() { void RP2040UartComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up UART bus..."); ESP_LOGCONFIG(TAG, "Running setup");
uint16_t config = get_config(); uint16_t config = get_config();

View File

@ -7,7 +7,7 @@ namespace ufire_ec {
static const char *const TAG = "ufire_ec"; static const char *const TAG = "ufire_ec";
void UFireECComponent::setup() { void UFireECComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up uFire_ec..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t version; uint8_t version;
if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) { if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) {

View File

@ -9,7 +9,7 @@ namespace ufire_ise {
static const char *const TAG = "ufire_ise"; static const char *const TAG = "ufire_ise";
void UFireISEComponent::setup() { void UFireISEComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up uFire_ise..."); ESP_LOGCONFIG(TAG, "Running setup");
uint8_t version; uint8_t version;
if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) { if (!this->read_byte(REGISTER_VERSION, &version) && version != 0xFF) {

View File

@ -8,7 +8,7 @@ namespace ultrasonic {
static const char *const TAG = "ultrasonic.sensor"; static const char *const TAG = "ultrasonic.sensor";
void UltrasonicSensorComponent::setup() { void UltrasonicSensorComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up Ultrasonic Sensor..."); ESP_LOGCONFIG(TAG, "Running setup");
this->trigger_pin_->setup(); this->trigger_pin_->setup();
this->trigger_pin_->digital_write(false); this->trigger_pin_->digital_write(false);
this->echo_pin_->setup(); this->echo_pin_->setup();

View File

@ -10,7 +10,7 @@ static const char *const TAG = "veml3235.sensor";
void VEML3235Sensor::setup() { void VEML3235Sensor::setup() {
uint8_t device_id[] = {0, 0}; 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()) { if (!this->refresh_config_reg()) {
ESP_LOGE(TAG, "Unable to write configuration"); ESP_LOGE(TAG, "Unable to write configuration");

View File

@ -78,7 +78,7 @@ static const char *get_gain_str(Gain gain) {
} }
void VEML7700Component::setup() { void VEML7700Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up VEML7700/6030..."); ESP_LOGCONFIG(TAG, "Running setup");
auto err = this->configure_(); auto err = this->configure_();
if (err != i2c::ERROR_OK) { if (err != i2c::ERROR_OK) {

View File

@ -235,7 +235,7 @@ std::string WebServer::get_config_json() {
} }
void WebServer::setup() { void WebServer::setup() {
ESP_LOGCONFIG(TAG, "Setting up web server..."); ESP_LOGCONFIG(TAG, "Running setup");
this->setup_controller(this->include_internal_); this->setup_controller(this->include_internal_);
this->base_->init(); this->base_->init();

View File

@ -142,7 +142,7 @@ void WeikaiRegisterI2C::write_fifo(uint8_t *data, size_t length) {
void WeikaiComponentI2C::setup() { void WeikaiComponentI2C::setup() {
// before any manipulation we store the address to base_address_ for future use // before any manipulation we store the address to base_address_ for future use
this->base_address_ = this->address_; 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_); this->base_address_);
// enable all channels // enable all channels

View File

@ -156,7 +156,7 @@ void WeikaiRegisterSPI::write_fifo(uint8_t *data, size_t length) {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void WeikaiComponentSPI::setup() { void WeikaiComponentSPI::setup() {
using namespace weikai; 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(); this->spi_setup();
// enable all channels // enable all channels
this->reg(WKREG_GENA, 0) = GENA_C1EN | GENA_C2EN | GENA_C3EN | GENA_C4EN; this->reg(WKREG_GENA, 0) = GENA_C1EN | GENA_C2EN | GENA_C3EN | GENA_C4EN;

View File

@ -45,7 +45,7 @@ static const char *const TAG = "wifi";
float WiFiComponent::get_setup_priority() const { return setup_priority::WIFI; } float WiFiComponent::get_setup_priority() const { return setup_priority::WIFI; }
void WiFiComponent::setup() { void WiFiComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up WiFi..."); ESP_LOGCONFIG(TAG, "Running setup");
this->wifi_pre_setup_(); this->wifi_pre_setup_();
if (this->enable_on_boot_) { if (this->enable_on_boot_) {
this->start(); this->start();

View File

@ -34,7 +34,7 @@ void X9cOutput::trim_value(int change_amount) {
} }
void X9cOutput::setup() { 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_->get_pin();
this->inc_pin_->setup(); this->inc_pin_->setup();

View File

@ -7,7 +7,7 @@ namespace xl9535 {
static const char *const TAG = "xl9535"; static const char *const TAG = "xl9535";
void XL9535Component::setup() { 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 // Check to see if the device can read from the register
uint8_t port = 0; uint8_t port = 0;