mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 09:32:21 +01:00
Fix compile with latest esp-idf on esp32c6 (#5677)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "pid_autotuner.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include <cinttypes>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433
|
||||
@@ -108,7 +109,7 @@ PIDAutotuner::PIDAutotuneResult PIDAutotuner::update(float setpoint, float proce
|
||||
}
|
||||
uint32_t phase = this->relay_function_.phase_count;
|
||||
ESP_LOGVV(TAG, "%s: >", this->id_.c_str());
|
||||
ESP_LOGVV(TAG, " Phase %u, enough=%u", phase, enough_data_phase_);
|
||||
ESP_LOGVV(TAG, " Phase %" PRIu32 ", enough=%" PRIu32, phase, enough_data_phase_);
|
||||
|
||||
if (this->enough_data_phase_ == 0) {
|
||||
this->enough_data_phase_ = phase;
|
||||
@@ -186,8 +187,8 @@ void PIDAutotuner::dump_config() {
|
||||
ESP_LOGD(TAG, " Autotune is still running!");
|
||||
ESP_LOGD(TAG, " Status: Trying to reach %.2f °C", setpoint_ - relay_function_.current_target_error());
|
||||
ESP_LOGD(TAG, " Stats so far:");
|
||||
ESP_LOGD(TAG, " Phases: %u", relay_function_.phase_count);
|
||||
ESP_LOGD(TAG, " Detected %u zero-crossings", frequency_detector_.zerocrossing_intervals.size()); // NOLINT
|
||||
ESP_LOGD(TAG, " Phases: %" PRIu32, relay_function_.phase_count);
|
||||
ESP_LOGD(TAG, " Detected %zu zero-crossings", frequency_detector_.zerocrossing_intervals.size());
|
||||
ESP_LOGD(TAG, " Current Phase Min: %.2f, Max: %.2f", amplitude_detector_.phase_min,
|
||||
amplitude_detector_.phase_max);
|
||||
}
|
||||
|
Reference in New Issue
Block a user