feat(advert): stav baterie jako ikonka na konci advertovaného jména

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5 committed 2026-09-21 19:13:38 +02:00
1 parent 78bcabaa2f
commit 5f56a80a78
7 files changed
+331 -3

No files matched your search

+42
View File
@@ -360,6 +360,48 @@ in order of preference:
---
#### Show battery state as an icon on the advertised name
*(TeTeHacko fork)* Appends a battery icon to the name carried in adverts, so
anyone who hears the node can see its state without logging in for telemetry.
Off by default.
**Usage:**
- `get batt.icon`
- `set batt.icon on|off`
**Default:** `off`
**Icons:** `☀️` above the threshold, `🪫` below it.
**Note:** The icon costs name bytes, and the LONGER of the two is always
budgeted for -- `☀️` is 6 bytes (U+2600 plus an invisible variation
selector), `🪫` is 4. With a position in the advert that leaves 17
bytes of name. If the name is too long the icon is dropped whole rather than
truncated, and `get batt.icon` says so; it also reports the measured voltage
and the state the next advert would carry.
**Note:** Switching is hysteretic (`BATT_ICON_HYST_MV`, default 100 mV) so the
icon does not follow the daily charge cycle of a solar node. A node drifting at
the measured 13 mV/day crosses a threshold about once a month, so the 25 h
flood advert interval is not a limitation here.
---
#### Battery threshold for the name icon
**Usage:**
- `get batt.icon.mv`
- `set batt.icon.mv <millivolts>`
**Set by build flag:** `BATT_ICON_LOW_MV`
**Default:** `3700` (roughly 44 % of a 1S Li-Ion cell)
**Parameters:**
- `millivolts`: `3000`..`4200`, or `0` to use the build default
---
#### View or change this node's latitude
**Usage:**
- `get lat`