VS1053 logging optimization

This commit is contained in:
Phil Schatzmann 2022-08-17 12:00:32 +02:00
parent 8affbeaf53
commit a18f6e2423

View File

@ -209,7 +209,8 @@ public:
/// Starts with the indicated configuration
bool begin(VS1053Config cfg) {
LOGI(LOG_METHOD);
cfg.logInfo();
this->cfg = cfg;
setAudioInfo(cfg);
LOGI("is_encoded_data: %s", cfg.is_encoded_data?"true":"false");
LOGI("cs_pin: %d", cfg.cs_pin);
LOGI("dcs_pin: %d", cfg.dcs_pin);
@ -217,8 +218,6 @@ public:
LOGI("reset_pin: %d", cfg.reset_pin);
LOGI("cs_sd_pin: %d", cfg.cs_sd_pin);
this->cfg = cfg;
setAudioInfo(cfg);
if (p_driver==nullptr){
p_driver = new VS1053BaseStream(cfg.cs_pin,cfg.dcs_pin,cfg.dreq_pin, cfg.reset_pin);
}