Fix stale shot volume carryover#343
Draft
john-unger wants to merge 1 commit intodecentespresso:mainfrom
Draft
Conversation
c4557bf to
29497d4
Compare
29497d4 to
ace6b51
Compare
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.
Summary
Fix intermittent early volumetric stops caused by stale in-memory shot-sample state carrying across shots.
Root cause
The app computes dispensed volume from successive
ShotSamplepackets using a storedSampleTimebaseline. That baseline was not being reliably reset for a new shot, and late or out-of-order packets could contaminate the next session while the app stayed connected. This could make the next shot appear nearly finished and triggerStopping for volumeafter only a few mL.This does not look like saved profile corruption. The target volume is still loaded from settings at shot start; the failure mode is stale live state.
Fix
ShotSampletiming/frame tracking at shot start and again when flow beginsRepro
Stopping for volume, sometimes around 5 mL actual output.Verify fix
Starting shot session,reset_shotsample_tracking,Ignoring stale ShotSample, andAUTOSTOP volume reason=volume.Testing
Manual verification only. No dedicated automated test coverage exists for this Tcl path in the repo.