1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-25 06:32:22 +01:00

Streamline setup() logging (g, h, i) (#8927)

This commit is contained in:
Keith Burzinski
2025-05-28 13:55:02 -05:00
committed by GitHub
parent 18653f8f69
commit 0ce03ae26b
29 changed files with 34 additions and 35 deletions

View File

@@ -14,18 +14,17 @@ static const uint8_t I2S_NUM_MAX = SOC_I2S_NUM; // because IDF 5+ took this awa
#endif
void I2SAudioComponent::setup() {
static i2s_port_t next_port_num = I2S_NUM_0;
ESP_LOGCONFIG(TAG, "Running setup");
static i2s_port_t next_port_num = I2S_NUM_0;
if (next_port_num >= I2S_NUM_MAX) {
ESP_LOGE(TAG, "Too many I2S Audio components!");
ESP_LOGE(TAG, "Too many I2S Audio components");
this->mark_failed();
return;
}
this->port_ = next_port_num;
next_port_num = (i2s_port_t) (next_port_num + 1);
ESP_LOGCONFIG(TAG, "Setting up I2S Audio...");
}
} // namespace i2s_audio

View File

@@ -120,7 +120,7 @@ void I2SAudioMediaPlayer::set_volume_(float volume, bool publish) {
}
void I2SAudioMediaPlayer::setup() {
ESP_LOGCONFIG(TAG, "Setting up Audio...");
ESP_LOGCONFIG(TAG, "Running setup");
this->state = media_player::MEDIA_PLAYER_STATE_IDLE;
}

View File

@@ -40,7 +40,7 @@ enum MicrophoneEventGroupBits : uint32_t {
};
void I2SAudioMicrophone::setup() {
ESP_LOGCONFIG(TAG, "Setting up I2S Audio Microphone...");
ESP_LOGCONFIG(TAG, "Running setup");
#ifdef USE_I2S_LEGACY
#if SOC_I2S_SUPPORTS_ADC
if (this->adc_) {

View File

@@ -99,7 +99,7 @@ static const std::vector<int16_t> Q15_VOLUME_SCALING_FACTORS = {
19508, 20665, 21891, 23189, 24565, 26022, 27566, 29201, 30933, 32767};
void I2SAudioSpeaker::setup() {
ESP_LOGCONFIG(TAG, "Setting up I2S Audio Speaker...");
ESP_LOGCONFIG(TAG, "Running setup");
this->event_group_ = xEventGroupCreate();