Merge branch 'main' of tesserakt.pro:alex/arduino-filament-dryer

This commit is contained in:
2026-07-05 19:02:18 +02:00
parent 3ab1b3e8fc
commit f614f75153
4 changed files with 171 additions and 47 deletions

View File

@@ -107,18 +107,14 @@ public:
return phase_;
}
if (maxTempC >= setpointC_ + AUTOTUNE_ABORT_ABOVE_C) {
fail(F("autotune: abort — temperature too high"));
if (maxTempC >= TARGET_MAX_C - 1.0f) {
fail(F("autotune: abort — max sensor at safety limit"));
return phase_;
}
if (nowMs - sessionStartMs_ > AUTOTUNE_SESSION_TIMEOUT_MS) {
fail(F("autotune: abort — session timeout"));
return phase_;
}
fanPwmOut = AUTOTUNE_PREHEAT_FAN_PWM;
if (phase_ == Phase::Preheat) {
fanPwmOut = AUTOTUNE_PREHEAT_FAN_PWM;
if (nowMs - phaseStartMs_ > AUTOTUNE_PREHEAT_TIMEOUT_MS) {
Serial.print(F("autotune: preheat failed — avg "));
Serial.print(avgTempC, 1);
@@ -136,6 +132,11 @@ public:
return phase_;
}
if (nowMs - sessionStartMs_ > AUTOTUNE_SESSION_TIMEOUT_MS) {
fail(F("autotune: abort — session timeout"));
return phase_;
}
spreadSum_ += spreadC;
++spreadSamples_;