README.md

Device UI checks #

Host-only tests (no board or PlatformIO needed):

c++ -std=c++11 -Wall -Wextra -Werror -Isrc tests/orientation_test.cpp -o /tmp/orientation-test
/tmp/orientation-test

Checks every pixel's bounds, unique coverage and inverse transform for all four rotations, plus debounce, flat/diagonal holds and millisecond-counter rollover.

Battery decoding/formatting/footer geometry:

c++ -std=c++11 -Wall -Wextra -Werror -Isrc tests/battery_test.cpp -o /tmp/battery-test
/tmp/battery-test

Checks all raw percentage bytes, USB-only versus battery-connected status, 0%/100%/unknown/no-battery labels, and bottom-right safe margins in all four orientations. Firmware build: .venv/bin/pio run.

Render scheduling (idle/active cadence, orientation changes, long pauses, timer wrap):

c++ -std=c++11 -Wall -Wextra -Werror -Isrc tests/render_schedule_test.cpp -o /tmp/render-schedule-test
/tmp/render-schedule-test

Charging indicator tests in battery_test.cpp exhaust all STATUS1/STATUS2 byte combinations, distinguish charging from USB-only/idle/discharge/no battery, and check the bolt/text/footer geometry in all four rotations. The indicator reads STATUS2 (0x01), using the vendor XPowersLib isCharging() convention, without writing PMU settings. Firmware build and host tests pass. After USB was reconnected, upload and an 18-second boot check passed: BATTERY 48% charging=1, display initialized, and Railway connected with a heartbeat reply. Steady-state capture held 50 fps with zero RX overruns and ~0.1 ms/window idle display work; the existing initial TLS pause dropped 840 ms before connection. Unplug-to-clear and visual appearance still need observation. On hardware, expect BATTERY <percent> charging=1 during actual charging and charging=0 otherwise. Visually check the bolt appears/disappears within five seconds, stays clear of the activity dot/text, and causes no idle animation or repeated screen flushes.

Credential helper #

test_credential_helper.py uses temporary fake config and a mocked Keychain lookup. It checks configured/explicit network selection, escaped passwords, unchanged passwords, missing config, failed lookup, and that output never prints network names or passwords. It does not access real Keychain entries.

Audio capture timing #

The device previously redrew every two captured frames, so the actual loop could not drain the microphone in real time. Instrumented baseline: 34.4 fps, ~1,038 ms spent drawing per ~1.04 s reporting window, with 225–240 ms of audio lost to I2S RX queue overflows. Other earlier runs were as low as ~16 fps. After 320 ms DMA buffering and 2/4 Hz display scheduling, an idle hardware run held 49.9–50.1 fps, ~114 ms/window drawing, and zero RX overflow duration. This confirms idle capture timing, not complete ASR accuracy or battery savings.

While speaking and while rotating into landscape, check PERF fps stays near 50 and rx_drop_ms=0.0; repeat during network reconnects. WS_UTT confirms returned text, and ENT lines=... confirms the tabletop stack was updated. No speech-filter thresholds or server behavior changed in this timing fix.

Quiet UI / activity dot #

c++ -std=c++11 -Wall -Wextra -Werror -Isrc tests/display_activity_test.cpp -o /tmp/display-activity-test
/tmp/display-activity-test

Covers no redraws at rest, 500 ms busy-dot transitions, activity finishing, wave motion and one-time settling, invalidation, timer wrap, and mapping partial rectangles in all four orientations against the full-frame pixel map. Quiet audio uses the unchanged capture threshold, not a new stricter filter. Above-threshold samples are latched between UI polls so short activity isn't missed by the slower redraw cadence. Quiet UI calls do not clear/transmit the framebuffer; only battery/rotation/entity changes require a static repaint. Dot-only changes transfer 12×12 pixels and leave the stack stationary.

A 24-second hardware boot run confirmed the lower-power settings, server connection/heartbeat, ~50 fps and zero overruns after startup catch-up. Quiet draw_ms was ~0.1 ms/window (versus ~114 ms/window before), ~1 ms when polling the PMU, and ~70 ms once when the displayed battery percentage changed. The first connection still dropped 560 ms before the WebSocket was ready. A temporary display-only probe then forced waiting and all four rotations: real 12×12 transfers completed repeatedly in each orientation (~0.7 ms/dot change), with no steady-state RX overruns. Full landscape repaints took ~138 ms. The probe was removed and normal firmware reflashed. A follow-up 12-second run held ~50 fps/zero overruns, including a real 0.72-second transmitted burst; waiting used ~1.2 ms drawing/window instead of full-frame redraws. Dot appearance still needs visual confirmation; battery runtime needs an unplugged measurement.

Lower-power profile verification #

Boot should report POWER wifi_sleep=MIN_MODEM ok=1 and POWER display_brightness=40% ok=1. A 38-second USB-powered hardware check connected to Railway and received three WS heartbeat pong replies. Steady capture averaged about 50 fps with zero RX overflow duration after connection; individual windows varied ~47–52 fps while the DMA backlog caught up. The first TLS connection blocked capture long enough to lose 600 ms at startup; this remains a known limitation of networking and capture sharing one loop. The idle test does not validate active speech, extended reconnect behavior, or battery runtime. Verify those in normal use; unplug USB for a drain comparison. TX power and speech-filter thresholds are unchanged.

The codec subsequently changed from WORK_MODE_BOTH (which enabled the unused speaker PA) to WORK_MODE_ADC, with GPIO46 explicitly driven LOW and removed from codec PA ownership. A 15-second hardware check reported POWER codec=ADC speaker_pa_gpio=0, PGA still +30 dB, nonzero microphone input, server connection/heartbeat, and a normal VAD burst. All post-connection windows had zero RX overruns; ~44/56 fps around the burst reflected buffered catch-up. The first TLS connection still dropped 900 ms at startup. This verifies input still operates, not far-field ASR accuracy or measured amplifier current savings.

Physical-device verification (not covered by host tests) #

  • Boot: expect IMU QMI8658 ready address=0x6a (or 0x6b) and DISPLAY ok=1. If detection fails, audio and the portrait UI should still work.
  • Expect BATTERY AXP2101 ready and an initial gauge reading; verify the bottom-right percentage stays readable and correctly positioned after each rotation. Hardware boot verification reported BATTERY 6% with normal audio capture and WebSocket connection after flashing. Fuel-gauge accuracy and visual positioning still need real-device observation; host tests check geometry.
  • Hold upright in native portrait, then rotate through all four edges. Each stable pose should settle after about 300 ms. Confirm the text is upright. The board mapping is screen-right = raw -Y, screen-down = raw +X; raw X/Y directly made the text top point left in every pose during the first test. Verify the corrected mapping on all four edges after flashing. Serial IMU rotation=... accel=... messages report transitions and raw g.
  • Check landscape fills 448x368 with no offset, mirroring, tearing or edge corruption; waveform must be vertically centred in each orientation.
  • Add enough entities to fill the stack. Rotate while waiting for a transcript. The white bottom-left dot must blink during capture/waiting without moving or deleting stack rows, and turn off when activity finishes. Verify it in all four orientations; quiet room noise should leave a static trace and no blink. Landscape-hidden rows must return in portrait. Wrapping deliberately remains 14 characters in both orientations so changing orientation never destructively rewraps existing history.
  • Lay the device flat and move near a diagonal: orientation should hold rather than chatter. Confirm audio/transcript delivery remains healthy during flips.

The panel stays in native portrait mode with its existing x gap. Pixels are rotated into one internal DMA band, and the flush waits for each transfer to complete before reusing that storage. No MADCTL axis swapping is used.