Files
id5100/DECISIONS.md
T

60 lines
3.9 KiB
Markdown

# id5100 — Decisions
Format: `YYYY-MM-DD: <decision> — <why>`
- 2026-06-14: Pure-stdlib `termios` instead of pyserial — system Python is PEP-668
externally-managed; per the escalation-brake rule, `--break-system-packages` for
one dependency is the wrong trade. `termios` is zero-install and reusable.
- 2026-06-14: Layered as codec (`civ.py`) / transport (`radio.py`) / CLI (`cli.py`)
— the codec is pure and unit-testable; web UI / HA-MQTT front ends bolt onto the
transport without touching byte plumbing.
- 2026-06-14: TDD the codec against the real probe capture (`00 00 30 47 01`
147.300000 MHz) — gives a hardware-true vector, not a made-up one.
- 2026-06-14: Cable lands on **[SP2]** (= CI-V), 9600 baud, addr 0x8C — verified
live, not assumed.
- 2026-06-14: Web panel = stdlib `http.server` + single `panel.html`, no framework
— keeps the no-deps promise; the UI is one self-contained file. One shared `Radio`
guarded by a lock (CI-V is half-duplex; concurrent transactions would interleave).
- 2026-06-14: `transact()` returns as soon as the radio's reply frame parses instead
of always burning the full timeout — dropped a full status poll from ~3.6s to ~0.2s,
making a ~1 Hz live S-meter poll viable.
- 2026-06-14: Aesthetic = industrial instrument faceplate (amber VFD via DSEG7 font,
LED S-meter, illuminated mode buttons) — matches the radio-gear domain and the
Sethian dark/orange brand. Verified by headless screenshot.
- 2026-06-14: RepeaterBook integration — local `repeaters.json` + a proximity-ordered
panel "Repeaters" card; tapping a row tunes the radio (freq + duplex + tone) over
CI-V. Operating convenience without per-request API calls.
- 2026-06-14: CSV-only data path (dropped the token-gated API client + systemd timer).
RepeaterBook's API is now auth-gated (`401 auth_missing`, manual app-token approval);
Seth supplied a CSV proximity export instead, so manual re-ingest is enough (YAGNI).
- 2026-06-14: No lat/long in the CSV → rank by file order (RepeaterBook's own proximity
sort) instead of haversine. The export is already nearest-first; geocoding is overkill.
- 2026-06-14: Mixed FM+DSTAR repeaters labeled FM (operable as analog now); pure DSTAR
labeled DV (freq/offset only — call routing is set on the head).
- 2026-06-14: **Live CI-V verification of repeater commands.** Verified on the rig:
duplex direction `0x0F` (read → 0x10 simplex), repeater tone `0x1B/00`, tone-switch
`0x16/42`. The tone field is 3 bytes on the wire (`00` pad + 2-byte BCD, e.g.
`00 08 85` = 88.5 Hz) — radio.py adds/strips the pad. A full `tune_repeater` to a live
repeater ACKed every step. Offset *amount* cmd `0x0D` is **rejected (NG)** by the
ID-5100 → removed; the radio applies its configured auto-offset when a duplex
direction is selected, so standard (0.6/5 MHz) repeaters work from duplex alone.
## Deferred / Rejected
- **Full software control-head replica** — rejected: the detachable head talks a
proprietary, undocumented bus to the main unit; CI-V exposes operating functions
only (no menu/LCD mirror). Not worth reverse-engineering.
- **pyserial** — rejected (see above).
- **DV mode set** — deferred: 0x17 unverified on this radio; don't ship set_mode('dv')
as trusted until confirmed against the manual's CI-V table or the live rig.
- **RS-MS1A data-jack protocol (D-STAR DR/callsign/messaging)** — out of scope for
this CI-V layer; separate effort if wanted.
- **RepeaterBook API client + daily systemd refresh** — deferred (CSV-only chosen);
revive if hands-off refresh is wanted. The token-request form text is in the design
spec under `docs/superpowers/specs/`.
- **CI-V offset-amount control** — rejected: the ID-5100 NGs cmd `0x0D`. Offset amount
is a radio-side config (auto-offset); only direction (DUP±) is settable over CI-V.
- **Distance/haversine ranking** — rejected for the CSV path: the export has no
lat/long and is already proximity-sorted, so file order is the rank.