feat(aprs): pick a map symbol from a list instead of typing two characters

The symbol table and code were free-text fields with no validation and no hint. Only the
first character was ever used, and only at packet-build time, so an operator could type
"satellite" into the table field, watch it persist, and beacon as "/" - the field lied about
what it did. aprs.fi's troubleshooting guidance puts transmit-side symbol misconfiguration
among the first things to check when a station never appears correctly.

The single strongest argument for a list: \S is Satellite/Pacsat but /S is SHUTTLE. One
keystroke apart, and both look right to someone typing from memory.

Fourteen entries covering fixed, on-foot, field, four vehicle classes, satellite, yagi,
phone, internet-only and handheld. Renderings are from aprs.org/symbols/symbolsX.txt
(WB4APR, Nov 2015) rather than recalled. A symbol the operator already set that is not on
the list appears first in the menu and stays selected, so opening the picker cannot silently
change an existing station's appearance.

The default changes from "/>" (CAR) to "/-" (House). The old default's own comment conceded
it was "a reasonable stand-in for a phone", but it showed every non-driving operator as a
vehicle. A house is right for most users and obviously wrong rather than misleading for the
rest. This cannot disturb an existing install: saveConfig writes every key unconditionally
and the enable switch calls it, so anyone who has ever turned APRS on has both symbol keys
on disk and the changed fallbacks cannot reach them. All three sites move together -
AprsStore's load fallback, AprsCard's blank-field fallback, and AprsBeacon.DEFAULT_SYMBOL -
because leaving one behind would substitute a car whenever the stored code was unusable.

The list lives in core:domain as pure data holding resource names rather than text, so the
wording stays in the locale files. Tests assert that every entry survives the transmit
sanitiser, that the pairs and description keys are unique, and that a pair off the list
reports as absent rather than resolving to something near it.
This commit is contained in:
mckero committed 2026-08-26 05:53:46 +00:00
1 parent 6db10b5b72
commit 08f9106749
8 files changed
+330 -20

No files matched your search

@@ -28,6 +28,23 @@
<string name="prefs_aprs_interval">周期(分钟)</string>
<string name="prefs_aprs_status">状态文本</string>
<string name="prefs_aprs_symbol_table">符号表</string>
<string name="aprs_symbol_house">房屋 - 固定台站</string>
<string name="aprs_symbol_house_alt">房屋, 备用符号表</string>
<string name="aprs_symbol_person">步行操作员</string>
<string name="aprs_symbol_yagi">固定站八木天线</string>
<string name="aprs_symbol_satellite">卫星台站</string>
<string name="aprs_symbol_portable">便携 / 野外运行</string>
<string name="aprs_symbol_phone">手机</string>
<string name="aprs_symbol_tcpip">仅互联网台站</string>
<string name="aprs_symbol_ht">手持电台</string>
<string name="aprs_symbol_car">轿车</string>
<string name="aprs_symbol_truck">卡车</string>
<string name="aprs_symbol_van">厢式车</string>
<string name="aprs_symbol_rv">房车</string>
<string name="aprs_symbol_bike">自行车</string>
<string name="prefs_aprs_symbol">地图符号</string>
<string name="prefs_aprs_symbol_custom">自定义 (%1$s%2$s)</string>
<string name="prefs_aprs_symbol_help">你的台站在 APRS 地图上的显示方式</string>
<string name="prefs_aprs_symbol_code">符号码</string>
<string name="prefs_aprs_save">保存</string>
<string name="prefs_aprs_cancel">取消</string>
@@ -29,6 +29,23 @@
<string name="prefs_aprs_interval">Interval (min)</string>
<string name="prefs_aprs_status">Status text</string>
<string name="prefs_aprs_symbol_table">Symbol table</string>
<string name="aprs_symbol_house">House - fixed station</string>
<string name="aprs_symbol_house_alt">House, alternate table</string>
<string name="aprs_symbol_person">Person on foot</string>
<string name="aprs_symbol_yagi">Yagi at a fixed site</string>
<string name="aprs_symbol_satellite">Satellite station</string>
<string name="aprs_symbol_portable">Portable / field operation</string>
<string name="aprs_symbol_phone">Phone</string>
<string name="aprs_symbol_tcpip">Internet-only station</string>
<string name="aprs_symbol_ht">Handheld radio</string>
<string name="aprs_symbol_car">Car</string>
<string name="aprs_symbol_truck">Truck</string>
<string name="aprs_symbol_van">Van</string>
<string name="aprs_symbol_rv">Motorhome</string>
<string name="aprs_symbol_bike">Bicycle</string>
<string name="prefs_aprs_symbol">Map symbol</string>
<string name="prefs_aprs_symbol_custom">Custom (%1$s%2$s)</string>
<string name="prefs_aprs_symbol_help">How your station appears on the APRS map</string>
<string name="prefs_aprs_symbol_code">Symbol code</string>
<string name="prefs_aprs_save">Save</string>
<string name="prefs_aprs_cancel">Cancel</string>