Expand description
User-facing tracker battery-state classification.
Structs§
- Battery
Thresholds - Default state thresholds for a single-cell Li-ion tracker.
- Level
Estimator - Approximate state-of-charge estimator for gauge-less boards: a rest-gated OCV table with a median filter, a discharge-direction clamp, and quantized output.
- Level
Sample - One estimator input: the monitor’s measurement plus its context.
Enums§
- Battery
State - Mutually exclusive battery modes presented by the tracker UX.
- Charge
Class - The charge-state distinction reported to something outside the UX — a protocol property, a companion app — as opposed to the five-way presentation classification.
Constants§
- SAG_
WINDOW_ MS - How long after a transient load a terminal-voltage reading is still treated as possibly sagged rather than as resting OCV.
Functions§
- charge_
class - The
ChargeClassbehind a five-wayBatteryState. - classify
- Classify external power first so battery-only warnings and lockouts can never leak into Charging or Charged from the user’s perspective.
- load_
recent - Whether a reading taken at
now_msfalls inside the sag window of the most recent reported load. - soc_
from_ ocv - State of charge for a resting (open-circuit) terminal voltage.