pub const fn battery_segments(level_percent: u8) -> u8Expand description
Number of lit segments for a known charge level, from 0 to
BATTERY_SEGMENTS.
The bands centre each bar count on the level it depicts: two of four bars covers 37–63 %, so a half-full pack draws half a body. The two end bands are deliberately narrower than the middle ones — full and empty are absolute claims, and a body should not look full at 80 % nor empty at 20 %.