perf(sensors): publish coherent barometer snapshots - #126
Draft
zjwhitehead wants to merge 1 commit into
Draft
Conversation
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.
Decision
Keep this draft until the live ESC/BMS acceptance matrix below passes. Merge #125 first, then rebase this branch and rerun the combined smoke test because both touch the controller-sensor task context.
What changes
Why
The prior P3 experiment wrote independent float globals. The writer-side I2C mutex did not make those fields coherent for readers. This version publishes all derived values, sample time, and validity together.
The previous missed-frame policy also reset lastWake to now. With a measured 37 ms render and a 33 ms period, that schedules the next frame at 70 ms. The phase-aligned policy advances the base to 33 ms and schedules the next frame at 66 ms. It prevents catch-up bursts without converting cadence into render time plus period. Getting render time below 33 ms remains the separate path to approximately 30 FPS.
Local validation
Live hardware acceptance matrix
Controller and barometer
Real ESC
Real BMS and battery
Soak and lifecycle
Not included