Backlight policy for night riding #45

Closed
opened 2026-08-31 17:14:53 +02:00 by robert · 1 comment
robert commented 2026-08-31 17:14:53 +02:00 (Migrated from git.butzei.de)

Goal

Readable after dark without destroying the battery.

Acceptance criteria

  • Backlight held on while riding, as an explicit opt-in mode
  • Ambient-aware or schedule-based automatic activation
  • Brief backlight on turn prompts even when the always-on mode is off
  • Battery cost measured and documented
  • Setting persists across rides

Files

  • watchapp/src/c/main.c
## Goal Readable after dark without destroying the battery. ## Acceptance criteria - [ ] Backlight held on while riding, as an explicit opt-in mode - [ ] Ambient-aware or schedule-based automatic activation - [ ] Brief backlight on turn prompts even when the always-on mode is off - [ ] Battery cost measured and documented - [ ] Setting persists across rides ## Files - `watchapp/src/c/main.c`
Owner

Closed by PR #106 (merged): backlight.c/.h (new module, matches the one-concern-per-file pattern), schedule-based activation (19:00-06:00 default) since the installed SDK has no live ambient-light-sensor API for apps -- checked against both emery/gabbro headers directly, not assumed. Always-on opt-in mode, turn-prompt flash function built and host-tested (backlight_flash_for_turn_prompt(), no caller yet since no turn-cue rendering exists until #33-#37 land -- honestly stated, not hidden). Persisted via a new PERSIST_KEY_BACKLIGHT_MODE in page.h's registry.

Verified for real: pebble build clean on all three platforms, 119 host assertions (27 new), and a real emulator run confirmed the exact light_enable() call sequence via pebble logs (true on RUNNING, false on STOPPED, none across pause/resume, zero calls with the shipped default off). Battery cost: heap footprint measured (13020->13252 bytes); real multi-hour drain against NFR-B1's budget still needs Robert's physical watch, honestly flagged.

Also fixed a real factual error: DESIGN.md section 7.4 claimed emery/gabbro have "no backlight" -- wrong, both have a real Light API per the installed SDK headers. Corrected with an explicit checked-fact note per D48's bar, not silently rewritten.

Closed by PR #106 (merged): backlight.c/.h (new module, matches the one-concern-per-file pattern), schedule-based activation (19:00-06:00 default) since the installed SDK has no live ambient-light-sensor API for apps -- checked against both emery/gabbro headers directly, not assumed. Always-on opt-in mode, turn-prompt flash function built and host-tested (backlight_flash_for_turn_prompt(), no caller yet since no turn-cue rendering exists until #33-#37 land -- honestly stated, not hidden). Persisted via a new PERSIST_KEY_BACKLIGHT_MODE in page.h's registry. Verified for real: pebble build clean on all three platforms, 119 host assertions (27 new), and a real emulator run confirmed the exact light_enable() call sequence via pebble logs (true on RUNNING, false on STOPPED, none across pause/resume, zero calls with the shipped default off). Battery cost: heap footprint measured (13020->13252 bytes); real multi-hour drain against NFR-B1's budget still needs Robert's physical watch, honestly flagged. Also fixed a real factual error: DESIGN.md section 7.4 claimed emery/gabbro have "no backlight" -- wrong, both have a real Light API per the installed SDK headers. Corrected with an explicit checked-fact note per D48's bar, not silently rewritten.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
robert/PedalPebble#45
No description provided.