Repository navigation
Re-seed the PID after lid-open and other Hold pauses - #25
Merged
Merged
Conversation
Hold skips the PID while the lid is open, but the PID's last timestamp stayed put, so the first update after the lid closed computed dt over the whole lid-open gap (up to LidMonitor's 3-minute latch) and folded error * gap into the integral. With the grill still ~20F low that is roughly +0.33 duty on the next cycle: an overfeed right as the lid closes, the overshoot the old comment said couldn't happen. SmokerPid.Pause() marks the state for re-seeding, reusing the existing NaN re-seed path: the next update keeps the integral, re-seeds time and temperature, and integrates nothing. The seed pass now returns P plus the held integral instead of P alone. Hold pauses on every path that skips the PID (lid open, reignition, igniter diversion, max setpoint), and ModeLoop pauses it in every non-Hold mode so entering Hold later doesn't integrate across the time spent elsewhere. Comments fixed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RR4Mzohe6jCncc5GYSqzQU
|
🚀 The Update (preview) for CamSoper-org/inferno-deploy/main (at d0dd8cc) was successful. Resource Changes Name Type Operation
~ copy-api command:remote:CopyToRemote update
+- restart-api command:remote:Command replaced
+- publish-api command:local:Command replaced
|
CamSoper
marked this pull request as ready for review
October 27, 2026 22:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Hold skips the PID while the lid is open, but the PID's last timestamp stayed put. The first update after the lid closed computed
dtover the whole lid-open gap (up to LidMonitor's 3-minute latch) and foldederror * gapinto the integral. With the grill still ~20F low that is roughly +0.33 duty on the next cycle: an overfeed right as the lid closes, which is the overshoot the old comment claimed couldn't happen.Fix
SmokerPid.Pause()marks the state for re-seeding, reusing the existing NaN re-seed path. The next update keeps the integral, re-seeds time and temperature, and integrates nothing.Pause()on every path that skips the PID: lid open, reignition, igniter diversion, and max setpoint.ModeLooppauses the PID in every non-Hold mode so entering Hold later doesn't integrate across time spent elsewhere.Tests
Two new tests in
SmokerPidTestsusingFakeTimeProvider: one checks that a 180s pause doesn't add to the integral on the first update back (and that the next update integrates exactly one interval), the other checks the integral is preserved across the re-seed.dotnet test Inferno.Testspasses (78/78).Generated by Claude Code