IDF 5 fixes for various components from test1.yaml (#5451)

This commit is contained in:
Keith Burzinski
2023-10-18 01:33:36 -05:00
committed by GitHub
parent 8ef743f25e
commit cdc4f7f59b
82 changed files with 173 additions and 97 deletions
@@ -14,7 +14,7 @@ void PVVXDisplay::dump_config() {
ESP_LOGCONFIG(TAG, " Characteristic UUID : %s", this->char_uuid_.to_string().c_str());
ESP_LOGCONFIG(TAG, " Auto clear : %s", YESNO(this->auto_clear_enabled_));
ESP_LOGCONFIG(TAG, " Set time on connection: %s", YESNO(this->time_ != nullptr));
ESP_LOGCONFIG(TAG, " Disconnect delay : %dms", this->disconnect_delay_ms_);
ESP_LOGCONFIG(TAG, " Disconnect delay : %" PRIu32 "ms", this->disconnect_delay_ms_);
LOG_UPDATE_INTERVAL(this);
}
@@ -139,7 +139,11 @@ void PVVXDisplay::sync_time_() {
}
time.recalc_timestamp_utc(true); // calculate timestamp of local time
uint8_t blk[5] = {};
#if ESP_IDF_VERSION_MAJOR >= 5
ESP_LOGD(TAG, "[%s] Sync time with timestamp %" PRIu64 ".", this->parent_->address_str().c_str(), time.timestamp);
#else
ESP_LOGD(TAG, "[%s] Sync time with timestamp %lu.", this->parent_->address_str().c_str(), time.timestamp);
#endif
blk[0] = 0x23;
blk[1] = time.timestamp & 0xff;
blk[2] = (time.timestamp >> 8) & 0xff;