Repository navigation
feat: fixed trailing 24 h chart with avg/peak readout - #15
Open
salmun-nister wants to merge 1 commit into
Open
salmun-nister wants to merge 1 commit into
salmun-nister wants to merge 1 commit into
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.
Fixes #11
1. Stitch the two day files
Model.jsgains a pure helper (testable outside QML):Panel.qmlreadsday-<yesterday>.jsonalongside today's (same dish partition), withprevDayStamprecomputed on the existing 2 s refresh, so the rollover needs no restart.stampOffset()steps the local date withDate.setDaterather than subtracting 24 h, which survives DST.Path hygiene while wiring the second file:
dayDir/dayBasestay empty until the dish identity arrives, soFileViewdoes not probe a root-level day file that never exists, and both dayFileViews setprintErrors: false- yesterday's file legitimately does not exist on a fresh install and the reload would otherwise log a warning every 2 s.2. Window summary instead of the duplicated live value
Side effect worth noting: the line no longer collapses to a single label when the link goes idle, because window statistics exist even with no current samples.
Testing
cur = 0, the window equals yesterday's1 ... 1439plus today's0;—;mean():[1,2,3] -> 2,[1,null,3] -> 2,[] -> null,null -> null;Known limitation
DST days (23 h / 25 h) shift the window by an hour twice a year; minute-of-day arithmetic is used deliberately instead of epoch math.
Scope
Display only. No Go changes, so
backend/bin/starlinkdis untouched and the release gate's byte-identical check is unaffected. Independent of the other open PRs.