Skip to content

v1.1.6: battery voltage history by charge level, sub-watt tray power - #9

Merged
nojackno2-ctrl merged 1 commit into
mainfrom
feat/v1.1.6-battery-voltage-history
Aug 5, 2026
Merged

v1.1.6: battery voltage history by charge level, sub-watt tray power#9
nojackno2-ctrl merged 1 commit into
mainfrom
feat/v1.1.6-battery-voltage-history

Conversation

@nojackno2-ctrl

Copy link
Copy Markdown
Owner

Records the battery driver's measured terminal voltage each time the integer battery percentage changes, and plots the resulting 0–100% curve on a new Battery Voltage History tab.

What's in it

  • Per-percentage average / min / max voltage, change-event count and last-recorded time, persisted in LocalAppData and shown in an exact-value table beside the chart, with a clear action.
  • Unobserved percentages are left as gaps rather than interpolated — an unmeasured voltage is never drawn as if it had been read.
  • A voltage is only recorded when IsVoltageMeasured is true, so the internal nominal voltage used for power math never reaches the curve.
  • Tray icon fix: every rate was rounded to an integer, so a real 0.1–0.9 W flow rendered as 0. Sub-watt rates now keep one decimal place; the integer and 99+ rules above 1 W are unchanged.

Review fixes applied before this PR

Four presentation defects in the new tab, none affecting recorded measurements:

  1. Vertical gridlines were drawn across the whole container while the curve is plotted into an inset area — they now span the plot area, so a gridline sits under the percentage it marks.
  2. The 25% / 75% X-axis labels sat at 30% / 70% (five equal columns with edge-aligned ends); the end columns are now 0.5*.
  3. LastRecordedAt was bound raw, rendering a culture-dependent timestamp; a LastRecordedAtText property now matches the app's yyyy-MM-dd HH:mm:ss convention.
  4. XAML placeholder text and the samples-column header disagreed with the localization strings that overwrite them at runtime.

Verification

  • Debug and Release solution builds: -warnaserror, 0 warnings / 0 errors
  • dotnet test: 17/17 passing (adds BatteryVoltageHistoryPointTests, TrayIconPowerFormattingTests)
  • git diff --check: clean

Not exercised: the live 0–100% curve needs a full discharge cycle on real hardware to fill in.

🤖 Generated with Claude Code

…1.1.6)

Records the battery driver's measured terminal voltage each time the integer
battery percentage changes, and plots the resulting 0-100% curve on a new
Battery Voltage History tab. Per-percentage average/min/max voltage, change
count and last-recorded time are persisted in LocalAppData and shown in an
exact-value table alongside the chart.

Unobserved percentages are left as gaps rather than interpolated, and a
voltage is only recorded when IsVoltageMeasured is true, so the internal
nominal voltage used for power math never reaches the curve.

Also fixes the tray icon rounding every rate to an integer, which rendered a
real 0.1-0.9 W flow as "0". Sub-watt rates now keep one decimal place; the
integer and "99+" rules above 1 W are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nojackno2-ctrl
nojackno2-ctrl merged commit 96162b0 into main Aug 5, 2026
1 check passed
@nojackno2-ctrl
nojackno2-ctrl deleted the feat/v1.1.6-battery-voltage-history branch August 5, 2026 12:52
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.

1 participant