The screen bits go into a VisorMeshShots record (shots.c, segment 1, no
globals: the delayed one runs from a procedure alarm inside whatever loop is
running, so menus and popups can be captured). make shots fetches the
database over HotSync and tools/shots.py writes PNGs to build/shots/.
RowList gets an optional hold callback: the pen still (3 px) on a row for half
a second unhighlights it, and lifting calls the callback (DMs fall back to a
tap). The channel actions take a slot, with the menu versions wrapping them.
Checks add the messages they pulled (outside muted channels) to a pending
table in unsaved prefs, with names looked up while they have globals; the
display launch lists up to five conversations and 'N more elsewhere'.
make_icon.sh takes a PNG and thresholds the 1-bit icons instead of dithering.
The alarm now stays set while the app is open (checks skip) and is set as
soon as the interval changes; each check records what it got to, shown as
'Last 8:11 no radio, next 8:16'.
visormesh.def adds vmcode3 and sections.h VM_SECT3, ahead of new screens
(segment 2 is at 27 KB). check_sections.py checks every extra section, and
now maps COFF symbols' (sec N) to section names: before, it only resolved
section symbols such as .text, not named ones. sect2.py takes --sect3.
Segment 1 was back at 27 KB. Settings, Contacts, Channel, Home, Node,
convos, messages, contacts, channels, rowlist and draw move to vmcode2:
segment 1 is now 10.3 KB, segment 2 23.4 KB. tools/sect2.py adds the
VM_SECT2 static declarations.
Checked in the compiled code, the rules in sections.h were too cautious:
literals in a vmcode2 function are emitted into vmcode2, a file's static
const data and calls to unannotated functions go through the __text__
base, and taking a vmcode2 function's address (event handlers, callbacks)
gives its real address. The real traps are shared extern const tables and
-fwritable-strings (PC-relative into .data). tools/check_sections.py runs
after every link and fails the build on any PC-relative reference from
vmcode2 to outside it; python3 added to the toolchain image for it.
Unicode: characters past Latin-1 all became '?', and Windows-1252 quotes
and dashes had no glyph in the small font. Now arrows, check marks, stars,
bullets and node-type marks map to the font's UI symbols, typographic
quotes and dashes to ASCII, any emoji to a new smiley glyph, and
variation selectors / zero-width joiners are dropped.
The transcript wrapped after a few characters on the Visor: gSmallFontWidths
was const, so prc-tools placed it in .text, but text.c reached it through an
extern declaration A5-relative (lea %a5@(0)) as if it were data, and read
garbage widths. The same applied to gPresets. Both generators now emit
non-const tables, with a note why. Host tests can't see this.
Font Preview showed garbled text: the bundled PilRC's FONT compiler writes
a broken NFNT header (first/last char words missing, later fields shifted,
height lost), reproduced with a two-glyph test font. gen_font.py now builds
the NFNT itself (header, glyph strip, location and offset/width tables),
decodes it back and checks every glyph, and PilRC includes it as a DATA
resource. Resources now rebuild when the font changes.
tools/gen_font.py builds an NFNT (app font 0x80) from X.org's public-domain
misc-fixed 4x6 BDF plus hand-drawn MeshTerm-style symbols (star, node-type
marks, ack/fail/pending, lock) in 0x80-0x9F, reusing Windows-1252's slots for
ellipsis and angle quotes. It also writes glyphs.h and a width table for host
tests. src/ui/draw.c registers the font and adds section, chip, cut and
right-align helpers. Options > Font Preview draws sample screens so the font
can be judged on the Visor's LCD before the real screens use it.
Contacts: Refresh downloads GET_CONTACTS into a backed-up Palm database
(VisorMeshContacts), keeping the previous list if the download fails, and
sorts by name. The screen lists name with type and route, taps show
details (key prefix, last advert). Path lengths are decoded as hash size
(bits 7-6) + hop count (bits 5-0), since PhillyMesh uses 2-byte hashes.
session.c keeps unread received bytes across waits; before, bytes after a
completed frame in the same read were dropped, which would lose
back-to-back frames like the contact list. Settings commands get two tries
(the Visor's USB link can drop while idle). Ports moves to an Options menu.
Local presets (tools/local-presets.json, PhillyMesh) are listed before
MeshCore's and survive gen_presets.py --fetch.
Settings validates against the firmware's limits before sending anything,
then sends only what changed (SET_ADVERT_NAME, SET_RADIO_PARAMS with the
client-repeat byte passed through from DEVICE_INFO, SET_RADIO_TX_POWER,
SET_PATH_HASH_MODE), requires RESP_OK for each and names the step that
failed, then re-reads DEVICE_INFO/SELF_INFO.
The preset pop-up uses a snapshot of MeshCore's suggested presets
(api.meshcore.nz, 27 entries) in tools/meshcore-presets.json; src/presets.c
is generated from it by tools/gen_presets.py with exact decimal conversion.
Radio state moves into session.c; TX power is now signed; adds
fixed-point decimal parse/format helpers with host tests.
Query radio on the Visor Neo got DEVICE_INFO from the XIAO via USB
cradle -> visor_bridge.py -> FTDI -> D6/D7 UART. The app's HsUd driver
sends on the Visor's HOTSYNC USB port (2), not GENERIC, so the bridge
listens on every port and replies on the one in use; stalled endpoints
are cleared instead of ending the session. The app waits after SrmOpen
and retries sends that time out while the bridge attaches. make install
stops the bridge, which would otherwise grab the Visor during HotSync.
The Ports screen showed the Neo's Serial Manager drivers, including
'HsUd' (USB, the GENERIC port). The app gets a Serial/USB link switch
(USB default); Query radio retries since the bridge needs a moment to
attach, and SrmSendWait is gone (it can block over USB with no host).
tools/visor_bridge.py (stdlib + libusb via ctypes) finds the GENERIC
port from the Visor's connection info and forwards bytes to the radio's
serial port, logging each companion frame. Ports shows one line per
driver so all of them fit.
macOS briefly holds the Visor right after HotSync enumerates it, so
pilot-link's single USBDeviceOpen failed with kIOReturnExclusiveAccess
and the Visor reported the connection couldn't be established. The
patch retries the open for up to 2 s. pilot-xfer -l now lists the
Visor Neo's databases.
Rename pi-install.sh to cradle-install.sh, default SYNC_HOST to the
Mac mini, and look for pilot-link in ~/.local (it's no longer packaged
in Debian 13). make install now depends on all, so it works when the
build runs in Docker.
prc-tools-remix 2.3.6 + PilRC + Palm OS 3.5 SDK (pinned) in a Docker
image; make builds visormesh.prc there when the toolchain isn't local.
App has a main form whose Query button sends CMD_DEVICE_QUERY over the
Serial Manager transport. Companion framing is plain C with host tests.
make install pushes the .prc to a Pi with the USB cradle (untested).