Add macOS host support and Waveshare 1.8" AMOLED board port#5
Add macOS host support and Waveshare 1.8" AMOLED board port#5lorddavidson wants to merge 1 commit into
Conversation
|
Thanks for the PR! I'll take a look in a few hours when I get back home, I think I even have one of the 1.8" boards to test as well. |
|
🤖AI Generated: Tested this on the 2.16 board — build/flash/runtime all clean, daemon connects, Usage screen renders identically, layout constants and One thing I wanted to ask about before I sign off — I don't have a 1.8" board on me right now so I can't verify this myself, but reading through the diff it looks like
How's it actually behaving for you on the unit you flashed? Curious whether I'm reading the wiring wrong, or whether you're already navigating via touch / a different path I'm not seeing. If there is a gap there, one shape I had in mind was remapping PWR (via EXIO4) → Shift+Tab and letting a touch tap cycle `Usage → Bluetooth → Splash`, but I'd rather hear how it works for you today before suggesting changes. |
|
Hey @lorddavidson I had techcrunch reach out the project so expedited the macos support and cherry picked parts from your branch into #6 I hope you don't mind. I wanted to have the macos support as soon as possible due to that article coming out, I credited you in the macos instructions in the README.md, really appreciate your work in verifying that. |
|
Hi @HermannBjorgvin, great news and of course I don't mind. Will look at fixing the 1.8 issues/questions over the weekend!
Thank you also for the mention :)
…________________________________
From: Hermann Björgvin ***@***.***>
Sent: Thursday, May 14, 2026 7:45 pm
To: HermannBjorgvin/Clawdmeter ***@***.***>
Cc: Chris Davidson ***@***.***>; Mention ***@***.***>
Subject: Re: [HermannBjorgvin/Clawdmeter] Add macOS host support and Waveshare 1.8" AMOLED board port (PR #5)
You don't often get email from ***@***.*** Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
[https://avatars.githubusercontent.com/u/5817854?s=20&v=4]HermannBjorgvin left a comment (HermannBjorgvin/Clawdmeter#5)<#5 (comment)>
Hey @lorddavidson<https://github.com/lorddavidson> I had techcrunch reach out the project so expedited the macos support and cherry picked parts from your branch into #6<#6> I hope you don't mind.
I wanted to have the macos support as soon as possible due to that article coming out, I credited you in the macos instructions in the README.md, really appreciate your work in verifying that.
—
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIX3B3KMIIU24FGYUSXOFGL42YH3DAVCNFSM6AAAAACY56GKDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DINJTGY4TSMRTGE>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.
|
Cherry-picks the macOS-specific pieces from PR HermannBjorgvin#5: Python daemon using bleak (CoreBluetooth backend), LaunchAgent template, flash-mac.sh, and install-mac.sh. Token is read from the macOS Keychain ("Claude Code-credentials" service); Linux behavior is unchanged. README split into "macOS installation" and "Linux installation" sections with parallel Flash / Pair / Install subsections. Co-Authored-By: Chris Davidson <36679917+lorddavidson@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move per-board layout numbers (margins, panel sizes, font choices, splash cell size) out of ui.cpp / splash.cpp into a single ui_layout.h with #if branches per board. Shared values stay outside any ifdef; overrides are added only where the original metrics actually break — currently just UI_BT_LINE_FONT, which drops to styrene_24 on the 450-wide LilyGO so the BT-screen MAC line doesn't clip at the right panel edge. Adapted from the approach in PR HermannBjorgvin#5 (1.8" AMOLED port). Both Waveshare and LilyGO envs build; BT screen verified on LilyGO hardware. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mascot (1) Threshold-colored big number: white >=30% left, yellow 10-29%, red <10%. Progress bar indicator matches. Critical-low signal is impossible to miss without taking up extra screen real estate. (2) Multi-account row cleanup: trimmed 'acct-' prefix at render time so the 4-char hash suffix shows alone (e.g. '9b7c 87% c1f2 92%' instead of 'acct-9b7c 87% | acct-c1f2 92%'). Switched to 3-space separator for breathing room. Trim only applied for auto-generated names; user-set labels (future) render verbatim. (3) Boot sequence: replaced the bright-orange 'CLAWDMETER BOOT' debug flash with a black screen + dim 'clawdmeter' wordmark for 500ms. The orange flash served its purpose during the flash-iteration debugging era; it's just visual noise now. (4) Real Codex mascot: generated via Gemini Nano Banana (same flow as Clawd) with teal/cyan coloring and the same chubby blob silhouette. Post-processed through codex_frames/postprocess.py (white-BG -> alpha, crop to bbox, resize 160x160 nearest), baked to firmware/src/assets/codex_sprite.h via rescale_sprites.py. splash::show(codex_palette=true) now renders the teal mascot on a teal backdrop instead of the procedural 'CODEX' label. The Codex sprite is single-frame for now; the same 4-frame animation pipeline (idle/blink/wave/sleep) could extend to Codex later if we want a matching loop. Skipped: auto-rotate progress hint (polish HermannBjorgvin#5) — useful but adds a global animated bar widget and reset bookkeeping; defer to next round.
Cherry-picks the macOS-specific pieces from PR HermannBjorgvin#5: Python daemon using bleak (CoreBluetooth backend), LaunchAgent template, flash-mac.sh, and install-mac.sh. Token is read from the macOS Keychain ("Claude Code-credentials" service); Linux behavior is unchanged. README split into "macOS installation" and "Linux installation" sections with parallel Flash / Pair / Install subsections. Co-Authored-By: Chris Davidson <36679917+lorddavidson@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Closing since #25 added 1.8" device support. Please bring a PR if you have any feedback on it of course! |
Summary
Adds macOS host support and a Waveshare ESP32-S3-Touch-AMOLED-1.8 board port, alongside the existing 2.16" Linux target. Both pre-existing paths are preserved — nothing breaks for current users.
What's new
macOS host (replaces
bluetoothctl/busctl/systemd)daemon/claude_usage_daemon.py— Python rewrite of the bash daemon usingbleak(CoreBluetooth). Mirrors the original's behavior: 60s poll, refresh-on-notify, 1→60s reconnect backoff, MAC/UUID caching.daemon/com.user.claude-usage-daemon.plist— LaunchAgent template (Mac equivalent of the systemd unit).install-mac.sh— installs to~/Library/LaunchAgents/, sets up a Python venv, primes Bluetooth permission interactively.flash-mac.sh— wrapspio run -t uploadwith/dev/cu.usbmodem*autodetect and-e <env>selection.Claude Code-credentialsservice) since~/.claude/.credentials.jsonis Linux-only; Linux path is preserved as a fallback.Firmware: Waveshare ESP32-S3-Touch-AMOLED-1.8 (368×448)
Gated by
-DBOARD_AMOLED_18— original 2.16" build is untouched at runtime.firmware/platformio.ini— refactored into a[common]base + two envs (waveshare_amoled_216,waveshare_amoled_18).firmware/src/display_cfg.h— board-conditional pins, resolution, driver typedefs:firmware/src/main.cpp— conditional object construction; minimal inline TCA9554 driver (reset pulse before display init);rotate_striprewritten to handle non-square panels (was hardcodedS = LCD_WIDTHwhich broke on 368×448);rot_bufsized bymax(LCD_W, LCD_H).firmware/src/ui_layout.h(new) — per-board layout constants forui.cpp(margins, panel sizes, splash cell size).firmware/src/ui.cpp/firmware/src/splash.cpp— consumeui_layout.h; splash canvas uses 18px cells on 1.8 (360×360 centered) vs 24px on 2.16 (480×480).Testing
pio run -e waveshare_amoled_216builds clean (regression check — confirms refactors didn't break upstream behavior)pio run -e waveshare_amoled_18builds cleanREQnotificationsdaemon/claude-usage-daemon.sh,install.sh,flash.sh, and.servicefiles are unmodified, so Linux behavior should be intact, but a second pair of eyes there would help.Notes