[pid] Fix inverted debug log conditions and broken smoothing formula (#15240)

This commit is contained in:
Jonathan Swoboda
2026-03-27 08:37:54 -10:00
committed by GitHub
parent 4b9467cd0c
commit 53bd57f3c2
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -101,10 +101,10 @@ PIDAutotuner::PIDAutotuneResult PIDAutotuner::update(float setpoint, float proce
if (!zc_symmetrical || !amplitude_convergent) {
// The frequency/amplitude is not fully accurate yet, try to wait
// until the fault clears, or terminate after a while anyway
if (zc_symmetrical) {
if (!zc_symmetrical) {
ESP_LOGVV(TAG, "%s: ZC is not symmetrical", this->id_.c_str());
}
if (amplitude_convergent) {
if (!amplitude_convergent) {
ESP_LOGVV(TAG, "%s: Amplitude is not convergent", this->id_.c_str());
}
uint32_t phase = this->relay_function_.phase_count;
+1 -1
View File
@@ -59,7 +59,7 @@ class PIDSimulator : public PollingComponent, public output::FloatOutput {
delayed_temps.erase(delayed_temps.begin());
float prev_temp = this->delayed_temps[0];
float alpha = 0.1f;
float ret = (1 - alpha) * prev_temp + alpha * prev_temp;
float ret = (1 - alpha) * prev_temp + alpha * temperature;
return ret;
}