Idle header channel indicator, stable battery percent, full-screen warnings - #16
Merged
Conversation
The group's radio channel was only visible buried in the settings menu. Show it as CHn right after the nickname on the idle screen so it's a permanent, glanceable reminder of which of the 10 channels the device is on.
The displayed battery percent was recomputed every ~1s from a raw, unfiltered INA219 voltage reading. Because the percent curve is steep in its middle segments (~0.2 %/mV), a few mV of load-induced noise per read showed up as the header percent jumping back and forth. Apply an EMA to the cached millivolts before the percent curve ever sees them (BATTERY_EMA_ALPHA_PERCENT), which also stabilizes the low-battery latch and the battery value sent to peers via the heartbeat.
Incoming hazard warnings need to be unmissable at a glance while riding. Rework the warning screen around the two-tone panel instead of fighting it: the affected rider's name fills the yellow strip (who), and the warning label auto-fits the largest font from a size ladder in the blue region below (what), word-wrapping to two lines when needed. Stays large for the full 15s display duration; short-click dismiss still works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CHnright next to the nickname in the idle header, so it's a permanent glanceable reminder instead of being buried in the settings menu.Test plan
pio run— firmware builds clean (Flash 11.3%, RAM 7.2%)pio test -e native— all 78 existing unit tests pass, no regressionsCHnrenders correctly next to the name across all channel values (0-9); battery percent no longer flickers under load; each warning label (CAR BEHIND,HAZARD AHEAD,BRAKING/STOP,REGROUP/WAIT,ATTENTION!) renders large and legible without clipping, in both one-line and two-line cases