Skip to content

Add Battery Meter Support#46

Open
anant-singh wants to merge 2 commits into
jeyeager65:mainfrom
anant-singh:feature/battery-meter
Open

Add Battery Meter Support#46
anant-singh wants to merge 2 commits into
jeyeager65:mainfrom
anant-singh:feature/battery-meter

Conversation

@anant-singh
Copy link
Copy Markdown

@anant-singh anant-singh commented Apr 19, 2026

Adds a compact graphical battery indicator powered by a MAX17048 I2C fuel gauge, shown in the main status bar and machine selection screen.

  • Auto-detects MAX17048 on the shared I2C bus at startup; silently disables if not present so the feature is opt-in via hardware.
  • Custom battery widget (outline + fill bar + nub + percentage label) with color coding: green (>55%), amber (20-55%), red (<20%), cyan (charging) with a lightning bolt overlay while charging.
  • machine_name fixed width (80px) to keep top-row layout deterministic and prevent overlap with WPos Z and the battery widget.
screenshot 3

anant-singh and others added 2 commits April 19, 2026 11:11
Adds a compact graphical battery indicator powered by a MAX17048 I2C
fuel gauge, shown in the main status bar and machine selection screen.

- Auto-detects MAX17048 on the shared I2C bus at startup; silently
  disables if not present so the feature is opt-in via hardware.
- Custom battery widget (outline + fill bar + nub + percentage label)
  with color coding: green (>55%), amber (20-55%), red (<20%), cyan
  (charging) with a lightning bolt overlay while charging.
- machine_name fixed width (80px) to keep top-row layout deterministic
  and prevent overlap with WPos Z and the battery widget.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The charging lightning bolt overlay was drawn in BATTERY_CHARGING
(cyan) on top of the battery fill which turns the same cyan when
charging, making the bolt invisible. Use TEXT_LIGHT for high contrast
against the cyan fill.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.

1 participant