feat: optional trailing-average smoothing for power/speed chart series - #1904
Open
dvystrcil wants to merge 2 commits into
Open
feat: optional trailing-average smoothing for power/speed chart series#1904dvystrcil wants to merge 2 commits into
dvystrcil wants to merge 2 commits into
Conversation
Adds an optional trailing moving-average smoothing to the thermal chart's power and speed series, controlled by a new General setting (None / 1 sec / 3 sec). Temperatures are left raw so real thermal lag stays visible. The smoothing is a pure, unit-tested util (smoothChartData) applied between the chart store and the ECharts dataset; window is stored in uiSettings.general.chartSmoothingWindow (seconds, 0 = none) and changes re-render the chart live. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Vystrcil <dvystrcil@gmail.com>
Extends the thermal-chart smoothing dropdown (None / 1 / 3 / 5 s) with longer trailing-average windows of 10, 15, and 30 seconds, for reading the trend on very spiky PWM power/speed series. The smoothing util is window-agnostic, so this only adds preset values to GeneralSettings.vue — no algorithm change and no new tests (the existing specs already cover the util at every window size). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Vystrcil <dvystrcil@gmail.com>
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.
Closes #1896
Summary
Adds an opt-in General setting that applies a trailing moving-average to the thermal chart's power/speed series only. Temperatures are left raw — real thermal lag stays visible.
None— no behavior change unless a user turns it on.None / 1 / 3 / 5 / 10 / 15 / 30 s.smoothChartData) applied between the chart store and the ECharts dataset; the window is stored inuiSettings.general.chartSmoothingWindow(seconds,0= none) and changes re-render the chart live.I posted this as a feature request three weeks ago (#1896) and offered to open a PR if there was interest, but haven't heard back — I understand maintainer time is limited, so I'm going ahead and opening this as a concrete, working reference per the offer in that issue. Very happy to adjust the design (global setting vs. per-chart, different presets, or close this out entirely) based on your take — no pressure either way.
Test plan
pnpm run lint— cleanpnpm run type-check— cleanpnpm run test— 330/330 passing (includes newchart-smoothing.spec.tscovering the util at every window size)pnpm run circular-check— cleanpnpm run build— production build succeedsSigned-off-by: Daniel Vystrcil dvystrcil@gmail.com