diff --git a/AGENTS.md b/AGENTS.md index 5b6242f..b9341d8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -459,6 +459,30 @@ Two constraints are not negotiable, both from untimed spin loops in the firmware measuring. Not hypothetical: the first test run decoded 48 registers correctly and still reported RSSI as 0 for precisely this reason. +### Counting distinct frames proves less than it looks + +Worth knowing before writing any test that watches the screen. + +Once the receiver reports a varying RSSI, the meter and its dBm readout redraw +constantly. So "are consecutive frames different" returns yes on a **completely parked +radio**. A first attempt at checking that scanning still worked scored 8/8 distinct +frames and established nothing at all. + +Compare the rows that answer the actual question instead. The framebuffer is 128x64 as +8 pages of 128 bytes, page *p* covering rows 8p..8p+7: + + page 0 status line + pages 1-2 upper VFO, large frequency digits + page 3 upper VFO sub-line + pages 5-7 lower VFO + +`tools/test_scan.py` compares pages 1-2, which only change when the radio retunes: 6 +distinct tunings over 6 samples. That matters because an always-busy receiver is a +plausible way to stall a scan, and the S-meter work made the receiver always busy. + +Page 4 is *not* the meter row, incidentally — it stayed byte-identical across all six +samples while the frequency changed. + ### PTT, and the transmit level bar PTT is not a matrix key. `GPIO_IsPttPressed` reads PB10 directly diff --git a/README.md b/README.md index 94d0ccd..eb84340 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ keypresses silently stop working. Run the test after touching that code; test_bk4819_readback.sh register reads come back bit-aligned test_smeter.py the S-meter reads a signal when monitoring test_ptt.py PTT keys the radio and releases cleanly + test_scan.py a busy band does not stall a scan lib_kill_emulator.sh cleanup that only ever kills emulators webui.py web remote control: live LCD plus clickable keypad dn42_firewall.sh restrict the web UI port to DN42 sources @@ -132,6 +133,7 @@ Then check the build actually works, which takes about a minute: bash tools/test_bk4819_readback.sh python3 tools/test_smeter.py python3 tools/test_ptt.py + python3 tools/test_scan.py This matters more than it looks. The keypad can break silently under -O2 without any compiler warning -- see the `volatile` note in [Status](#status) -- so a clean