Skip to content

feat: optional trailing-average smoothing for power/speed chart series - #1904

Open
dvystrcil wants to merge 2 commits into
fluidd-core:developfrom
dvystrcil:feat/chart-smoothing
Open

feat: optional trailing-average smoothing for power/speed chart series#1904
dvystrcil wants to merge 2 commits into
fluidd-core:developfrom
dvystrcil:feat/chart-smoothing

Conversation

@dvystrcil

Copy link
Copy Markdown

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.

  • Default is None — no behavior change unless a user turns it on.
  • Window presets: None / 1 / 3 / 5 / 10 / 15 / 30 s.
  • Smoothing is a pure, unit-tested util (smoothChartData) applied between the chart store and the ECharts dataset; the window is stored in uiSettings.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 — clean
  • pnpm run type-check — clean
  • pnpm run test — 330/330 passing (includes new chart-smoothing.spec.ts covering the util at every window size)
  • pnpm run circular-check — clean
  • pnpm run build — production build succeeds
  • Manually verified on my own printer (Creality K1) — screenshot in feat: optional trailing-average smoothing for power/speed chart series #1896 shows the same power trace with smoothing off vs. 3s

Signed-off-by: Daniel Vystrcil dvystrcil@gmail.com

dvystrcil and others added 2 commits July 22, 2026 12:25
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: optional trailing-average smoothing for power/speed chart series

1 participant