scripts/ is sorted by handheld: picocalc/ and uconsole/, indexed from the hardware manual

The Calculinux bring-up, both console-font builds, the GPL-2.0 text that belongs
beside the 6x8 one, and the xiao-radio firmware kit move under scripts/picocalc/;
the SPI bridge is scripts/uconsole/meshterm-spi-bridge. The folder's own README is
gone: its per-file index is now a section of docs/hardware.md, next to the table
that says which manual is yours. Every path in the manuals, NOTICE, CLAUDE.md, the
tests, the package docstrings and the scripts' own headers follows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Fable 5.1 committed 2026-09-15 22:36:49 -04:00
1 parent 657cc93691
commit 12941b8f3c
28 files changed
+78 -69

No files matched your search

+3 -3
View File
@@ -31,6 +31,6 @@ output/
# addresses, logins, the local venv path). .dev.env.example is tracked and shows the shape.
.dev.env
# Built radio firmware (scripts/xiao-radio/build-firmware.sh writes it here)
scripts/xiao-radio/*.uf2
scripts/xiao-radio/_meshcore-build/
# Built radio firmware (scripts/picocalc/xiao-radio/build-firmware.sh writes it here)
scripts/picocalc/xiao-radio/*.uf2
scripts/picocalc/xiao-radio/_meshcore-build/
+9
View File
@@ -17,6 +17,15 @@ allowed to change behaviour, not just add to it.
## [Unreleased]
- **`scripts/` is sorted by handheld.** The PicoCalc's Calculinux bring-up, its two
console-font builds, the GPL-2.0 text that belongs beside the 6×8 one, and the
`xiao-radio/` firmware kit all live under `scripts/picocalc/`; the SPI bridge is
`scripts/uconsole/meshterm-spi-bridge`. The folder's own README is gone — its index of
what every file does and which machine runs it is a section of
[`docs/hardware.md`](docs/hardware.md) now, beside the table that says which manual is
yours. Every path in the manuals, the notices, the tests and the scripts' own headers
follows.
- **The 6×12 console-font script carries its size in its name**, `calculinux-console-font-6x12.sh`,
like its 6×8 sibling always did. Same script, every reference updated.
+1 -1
View File
@@ -545,7 +545,7 @@ branch on the platform per frame, and never `from meshterm.platforms import PLAT
`MapCanvas.to_ansi_lines`) — but the fold is the safety net, not the design.
- The glyph contract is `ui/fontset.py` — the installed console font's exact codepoint
inventory, device-verified. A character outside it is a test failure, not a tofu box
found on-device. The font itself is built by `scripts/calculinux-console-font-6x12.sh`;
found on-device. The font itself is built by `scripts/picocalc/calculinux-console-font-6x12.sh`;
the two files move in the same commit.
- The 16-slot palette is `theme._VT_SLOTS` (programmed via `/etc/vtrgb`; same script).
`MESH_THEME_16` speaks `color(0..15)` only; backgrounds stop at slot 7. Both themes
+2 -2
View File
@@ -25,10 +25,10 @@ project and is not authorized to do so.
--------------------------------------------------------------------------------
Device script: scripts/calculinux-console-font-6x8.sh embeds the Linux kernel's
Device script: scripts/picocalc/calculinux-console-font-6x8.sh embeds the Linux kernel's
font_6x8 bitmap (lib/fonts/font_6x8.c) and is therefore licensed GPL-2.0-only,
as is the console font it builds; its terms are included beside it as
scripts/LICENSE.GPL-2.0 and are its only license -- the Apache License above
scripts/picocalc/LICENSE.GPL-2.0 and are its only license -- the Apache License above
does not apply to it. Nothing GPL-2.0 reaches the MeshTerm package: that script
is excluded from the distribution, runs on the device, and produces a PSF data
file the Linux console driver loads, which MeshTerm neither links nor bundles.
+29 -3
View File
@@ -18,9 +18,35 @@ its own step-by-step manual, and this page only tells you which one is yours.
| a MeshCore companion on USB, BLE or Wi-Fi | nothing here — the [README](../README.md) |
The two targets have nothing in common but MeshTerm itself. The device-side scripts each
manual runs live in [`scripts/`](../scripts/), whose [index](../scripts/README.md) says what
every file does and which machine it runs on. Read a script before you run it; most run as
root and change the machine they run on.
manual runs live in [`scripts/`](../scripts/), one folder per handheld; the
[index below](#the-scripts) says what every file does and which machine it runs on. Read a
script before you run it; most run as root and change the machine they run on.
## The scripts
[`scripts/`](../scripts/) holds the device-side helpers, one folder per manual:
[`picocalc/`](../scripts/picocalc/) for the PicoCalc — bringing up Calculinux on the Lyra,
building its console font, and (under [`xiao-radio/`](../scripts/picocalc/xiao-radio/))
giving it a MeshCore radio over UART — and [`uconsole/`](../scripts/uconsole/) for the
bridge that fronts the uConsole's SPI-attached LoRa chip as a companion. The manual is the
walkthrough; each script's own header says what it assumes about the machine and why each
step is the way it is. On the Lyra, only one program may hold `/dev/ttyS1` — MeshTerm
directly, or a pump in front of it, never both.
| File | Runs on | What it does |
| --- | --- | --- |
| [`picocalc/calculinux-setup.sh`](../scripts/picocalc/calculinux-setup.sh) | the Lyra (root) | One-time bring-up: python packages, the Wi-Fi boot-scan kick, a boot clock sync (there is no RTC), the deploy user, the checkout, the venv and `pip install -e .`, the login PATH, and the console font. Idempotent. |
| [`picocalc/calculinux-console-font-6x12.sh`](../scripts/picocalc/calculinux-console-font-6x12.sh) | the Lyra (root) | Just the console font: builds, installs and persists the 512-glyph **meshterm** PSF (braille, node marks, rounded frame corners, the list cursor) and restores the stock 16-slot palette. Calls the 6×8 build below when it sits alongside. Run it alone after a MeshTerm update. |
| [`picocalc/calculinux-console-font-6x8.sh`](../scripts/picocalc/calculinux-console-font-6x8.sh) | the Lyra (root) | The shorter-cell companion font, **meshterm8** (6×8 → 53×40), for anyone who wants more rows than the 6×12 default gives. Its base bitmap is the kernel's `font_6x8`, so this one file and the PSF it builds are **GPL-2.0-only** ([`LICENSE.GPL-2.0`](../scripts/picocalc/LICENSE.GPL-2.0) sits beside it); it reads the donor/alias/keeper tables out of the script above rather than keeping a second copy. Pick between the two fonts from MeshTerm's Preferences page. |
| [`picocalc/calculinux-wifi-set.sh`](../scripts/picocalc/calculinux-wifi-set.sh) | the Lyra (sudo) | Interactive Wi-Fi join: prompts for an SSID and passphrase, writes iwd's credentials, connects now. This is how a network *becomes* known to the boot kick. |
| [`picocalc/calculinux-radio-bridge.sh`](../scripts/picocalc/calculinux-radio-bridge.sh) | the Lyra (root) | **Unfinished, unsupported.** An early UART-to-TCP pump, superseded by `xiao-radio/lyra-setup.sh`; its header describes routing it does not contain. See the manual before reading it. |
| [`picocalc/xiao-radio/`](../scripts/picocalc/xiao-radio/) | see below | Everything for the XIAO nRF52840 + Wio-SX1262 radio wired to the Lyra's UART1; its [bench card](../scripts/picocalc/xiao-radio/README.md) has the wiring table. The firmware is MeshCore, MIT-licensed — [`LICENSE.MeshCore`](../scripts/picocalc/xiao-radio/LICENSE.MeshCore) sits beside the patch. |
| [`xiao-radio/build-firmware.sh`](../scripts/picocalc/xiao-radio/build-firmware.sh) | dev machine | Clones and patches MeshCore, builds the `Xiao_nrf52_companion_radio_serial` environment, emits the `.uf2`. |
| [`xiao-radio/flash.py`](../scripts/picocalc/xiao-radio/flash.py) | dev machine | Flashes the `.uf2` to the XIAO over its UF2 bootloader, refusing the wrong board or SoftDevice; prints the serial-DFU command when the bootloader offers no drive. |
| [`xiao-radio/meshcore-uart1.patch`](../scripts/picocalc/xiao-radio/meshcore-uart1.patch) | — | The two firmware hunks: the companion on nRF52 `Serial1`, and I²C moved off the UART pads. Not upstream yet. |
| [`xiao-radio/lyra-setup.sh`](../scripts/picocalc/xiao-radio/lyra-setup.sh) | the Lyra (root) | Boot-persistent UART1 → GP4/GP5 mux service, `dialout` membership, and a default MeshTerm serial profile for `/dev/ttyS1`. |
| [`xiao-radio/uart1-mux.py`](../scripts/picocalc/xiao-radio/uart1-mux.py) | the Lyra (root) | The matrix-IO register poke that routes UART1 to the header pads, run once per boot by the service above. |
| [`uconsole/meshterm-spi-bridge`](../scripts/uconsole/meshterm-spi-bridge) | the radio host (your user) | Runs a mesh node in software over an SPI-attached SX1262 (uConsole AIO, Waveshare HATs) and serves the companion protocol on `127.0.0.1:5000`. Setup menu, preflight, optional `systemd --user` service. Runs on `openhop_core` (preferred) or its predecessor `pymc_core`; see the manual for the venv it wants on a bookworm uConsole. |
## The regular and picocalc platforms
+8 -8
View File
@@ -416,8 +416,8 @@ the network, so this is a one-time step; to change networks later, run `uwific`
### Step 8 — Copy the setup scripts to the device
You need this repository's `scripts/` directory on the Lyra. Three ways to get it there,
in order of ease:
You need this repository's `scripts/` directory on the Lyra — its `picocalc/` folder is the
part the Lyra runs. Three ways to get it there, in order of ease:
- **`scp` from your PC**, once Wi-Fi is up. Find the Lyra's IP address with `ip addr show
wlan0` on the device, then from your PC:
@@ -448,7 +448,7 @@ mv /home/pico/scripts /root/
```bash
# on the PicoCalc, as root, with scripts/ copied over
cd scripts
cd scripts/picocalc
sh calculinux-setup.sh
```
@@ -558,21 +558,21 @@ this somewhere with a decent connection.
```bash
# on the PC (Git Bash or WSL on Windows)
cd scripts/xiao-radio
cd scripts/picocalc/xiao-radio
sh build-firmware.sh
```
You should see it clone MeshCore, apply a patch, build, and finish with:
```
DONE. Firmware: /path/to/scripts/xiao-radio/meshcore-xiao-radio.uf2
DONE. Firmware: /path/to/scripts/picocalc/xiao-radio/meshcore-xiao-radio.uf2
Next: put the XIAO in bootloader (double-tap reset) and run: python flash.py
```
Here's what it did, so you could do it by hand if you needed to:
1. Cloned [MeshCore](https://github.com/meshcore-dev/MeshCore) into
`scripts/xiao-radio/_meshcore-build`.
`scripts/picocalc/xiao-radio/_meshcore-build`.
2. Checked out the pinned commit `e9edfc8e` on the `dev` branch — the commit this patch is
known to apply cleanly to and build against.
3. Applied `meshcore-uart1.patch`.
@@ -619,7 +619,7 @@ If you want to track newer MeshCore instead of the pinned commit:
git clone https://github.com/meshcore-dev/MeshCore.git
cd MeshCore
git checkout dev # or MESHCORE_COMMIT=dev sh build-firmware.sh
git apply /path/to/scripts/xiao-radio/meshcore-uart1.patch
git apply /path/to/scripts/picocalc/xiao-radio/meshcore-uart1.patch
pio run -e Xiao_nrf52_companion_radio_serial
python bin/uf2conv/uf2conv.py .pio/build/Xiao_nrf52_companion_radio_serial/firmware.hex \
-c -f 0xADA52840 -o meshcore-xiao-radio.uf2
@@ -750,7 +750,7 @@ haven't already (Step 8), then:
```bash
# on the PicoCalc, as root
sh scripts/xiao-radio/lyra-setup.sh # MT_USER=meshterm by default
sh scripts/picocalc/xiao-radio/lyra-setup.sh # MT_USER=meshterm by default
```
It does three idempotent things:
+3 -3
View File
@@ -157,19 +157,19 @@ its first check line names the interpreter and the runtime.
## Step 3 — Get the bridge
`scripts/meshterm-spi-bridge` is a single, self-contained Python file — no install step of
`scripts/uconsole/meshterm-spi-bridge` is a single, self-contained Python file — no install step of
its own. Either clone the MeshTerm repo:
```bash
git clone https://github.com/jpmartineau/MeshTerm
cd MeshTerm/scripts
cd MeshTerm/scripts/uconsole
```
or download just the one file:
```bash
curl -L -o meshterm-spi-bridge \
https://raw.githubusercontent.com/jpmartineau/MeshTerm/main/scripts/meshterm-spi-bridge
https://raw.githubusercontent.com/jpmartineau/MeshTerm/main/scripts/uconsole/meshterm-spi-bridge
```
Make it executable:
+3 -3
View File
@@ -179,9 +179,9 @@ _CONSOLE_SETUP_CHOICES: dict[str, str] = {
"off": "Leave it alone",
}
#: The two console fonts ``scripts/calculinux-console-font-6x12.sh`` (and its 6x8 companion)
#: build for the PicoCalc's framebuffer panel. Each is named by its cell and by the screen
#: that cell buys, because choosing a font here is choosing how much fits — not a bitmap.
#: The two console fonts ``scripts/picocalc/calculinux-console-font-6x12.sh`` (and its 6x8
#: companion) build for the PicoCalc's framebuffer panel. Each is named by its cell and by the
#: screen that cell buys, because choosing a font here is choosing how much fits — not a bitmap.
#: Plain ASCII ``x`` and not ``×``: the multiplication sign is not one of the 512 glyphs
#: the console font carries, so it would draw as a tofu box on the one platform this
#: preference is offered on. The value maps to a file in
+2 -1
View File
@@ -39,7 +39,8 @@ from ..core.config import default_config_dir
from ..persistence.logging import get_logger
from ..platforms import get_platform
#: Where ``scripts/calculinux-console-font-6x12.sh`` and its 6x8 companion install the fonts.
#: Where ``scripts/picocalc/calculinux-console-font-6x12.sh`` and its 6x8 companion install
#: the fonts.
FONT_DIR = Path("/usr/share/consolefonts")
#: One preference value -> the file the build script writes for it. This map lives beside
+1 -1
View File
@@ -2,7 +2,7 @@
"""The PicoCalc console font's codepoint inventory — the glyph contract.
The PicoCalc panel draws through the kernel console with one 512-glyph PSF font
(``meshterm.psf.gz``, built by ``scripts/calculinux-console-font-6x12.sh``): the stock
(``meshterm.psf.gz``, built by ``scripts/picocalc/calculinux-console-font-6x12.sh``): the stock
Terminus 6×12 base (a Cyrillic-coverage table — note there are **no accented Latin
letters**), the full braille block, MeshTerm's own marks drawn into donor slots, and a
few aliases. A character outside this set renders as a blank on the panel, so *nothing
+1 -1
View File
@@ -240,7 +240,7 @@ _VT_SLOTS: tuple[tuple[int, str, str], ...] = (
#: The custom 16-slot remap P3 originally shipped (tailwind-family RGBs programmed via
#: ``setvtrgb``) — **archived, not installed**: JP chose the standard palette but asked
#: to keep this in case he changes his mind. Reinstall with
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/calculinux-console-font-6x12.sh`` (whose opt-in
#: ``MESHTERM_CUSTOM_PALETTE=1 sh scripts/picocalc/calculinux-console-font-6x12.sh`` (whose opt-in
#: block a test keeps byte-identical to :func:`vtrgb_lines`); MESH_THEME_16 would then
#: want re-tuning against it (see git history at c6485c6 for the matching theme).
_VT_SLOTS_CUSTOM: tuple[tuple[int, str, str], ...] = (
-32
View File
@@ -1,32 +0,0 @@
# scripts
Device-side helpers that put MeshTerm on real hardware: bringing up a ClockworkPi PicoCalc
(Luckfox Lyra, Calculinux) and building its console font, giving that handheld a real
MeshCore radio over UART, and fronting an SPI-attached LoRa chip as if it were a companion
device. They run **on the device**, most of them as root, and they are meant to be read
before they are run.
**Start with the manual for your device**: [`docs/picocalc.md`](../docs/picocalc.md) walks a
stock PicoCalc from the shopping list to a working radio, and [`docs/uconsole.md`](../docs/uconsole.md)
installs the SPI bridge on a uConsole. Each manual ends on what has only ever been proven
on one bench, and each script's header says what it assumes about the machine and why each
step is the way it is. The table below is the index.
| File | Runs on | What it does |
| --- | --- | --- |
| [`calculinux-setup.sh`](calculinux-setup.sh) | the Lyra (root) | One-time bring-up: python packages, the Wi-Fi boot-scan kick, a boot clock sync (there is no RTC), the deploy user, the checkout, the venv and `pip install -e .`, the login PATH, and the console font. Idempotent. |
| [`calculinux-console-font-6x12.sh`](calculinux-console-font-6x12.sh) | the Lyra (root) | Just the console font: builds, installs and persists the 512-glyph **meshterm** PSF (braille, node marks, rounded frame corners, the list cursor) and restores the stock 16-slot palette. Calls the 6×8 build below when it sits alongside. Run it alone after a MeshTerm update. |
| [`calculinux-console-font-6x8.sh`](calculinux-console-font-6x8.sh) | the Lyra (root) | The shorter-cell companion font, **meshterm8** (6×8 → 53×40), for anyone who wants more rows than the 6×12 default gives. Its base bitmap is the kernel's `font_6x8`, so this one file and the PSF it builds are **GPL-2.0-only** ([`LICENSE.GPL-2.0`](LICENSE.GPL-2.0)); it reads the donor/alias/keeper tables out of the script above rather than keeping a second copy. Pick between the two fonts from MeshTerm's Preferences page. |
| [`calculinux-wifi-set.sh`](calculinux-wifi-set.sh) | the Lyra (sudo) | Interactive Wi-Fi join: prompts for an SSID and passphrase, writes iwd's credentials, connects now. This is how a network *becomes* known to the boot kick. |
| [`calculinux-radio-bridge.sh`](calculinux-radio-bridge.sh) | the Lyra (root) | **Unfinished, unsupported.** An early UART-to-TCP pump, superseded by `xiao-radio/lyra-setup.sh`; its header describes routing it does not contain. See the manual before reading it. |
| [`meshterm-spi-bridge`](meshterm-spi-bridge) | the radio host (your user) | Runs a mesh node in software over an SPI-attached SX1262 (uConsole AIO, Waveshare HATs) and serves the companion protocol on `127.0.0.1:5000`. Setup menu, preflight, optional `systemd --user` service. Runs on `openhop_core` (preferred) or its predecessor `pymc_core`; see the manual for the venv it wants on a bookworm uConsole. |
| [`xiao-radio/`](xiao-radio/) | see below | Everything for the XIAO nRF52840 + Wio-SX1262 radio wired to the Lyra's UART1. |
| [`xiao-radio/build-firmware.sh`](xiao-radio/build-firmware.sh) | dev machine | Clones and patches MeshCore, builds the `Xiao_nrf52_companion_radio_serial` environment, emits the `.uf2`. |
| [`xiao-radio/flash.py`](xiao-radio/flash.py) | dev machine | Flashes the `.uf2` to the XIAO over its UF2 bootloader, refusing the wrong board or SoftDevice; prints the serial-DFU command when the bootloader offers no drive. |
| [`xiao-radio/meshcore-uart1.patch`](xiao-radio/meshcore-uart1.patch) | — | The two firmware hunks: the companion on nRF52 `Serial1`, and I²C moved off the UART pads. Not upstream yet. |
| [`xiao-radio/lyra-setup.sh`](xiao-radio/lyra-setup.sh) | the Lyra (root) | Boot-persistent UART1 → GP4/GP5 mux service, `dialout` membership, and a default MeshTerm serial profile for `/dev/ttyS1`. |
| [`xiao-radio/uart1-mux.py`](xiao-radio/uart1-mux.py) | the Lyra (root) | The matrix-IO register poke that routes UART1 to the header pads, run once per boot by the service above. |
The PicoCalc scripts and the SPI bridge belong to different machines and share nothing but
MeshTerm. On the Lyra, only one program may hold `/dev/ttyS1` — MeshTerm directly, or a pump
in front of it, never both.
File renamed without changes.
@@ -258,7 +258,7 @@ PYEOF
# --- the 6x8 companion, out of its own (GPL-2.0) file -----------------------------------
# Kept separate because its base bitmap is the kernel's font_6x8 and the produced PSF is
# therefore GPL-2.0 -- see scripts/calculinux-console-font-6x8.sh and scripts/LICENSE.GPL-2.0.
# therefore GPL-2.0 -- see scripts/picocalc/calculinux-console-font-6x8.sh and scripts/picocalc/LICENSE.GPL-2.0.
# It re-uses the shared generator block above rather than carrying a second copy of the
# donor/alias/keeper tables, so a run here still produces both fonts, as it always did.
# A failure there is not a failure here: the 6x12 default is the font the device boots in.
@@ -267,7 +267,7 @@ if [ "${SKIP_6X8:-0}" = 1 ]; then
elif [ -f "$BUILD8" ]; then
sh "$BUILD8" || echo "warning: the 6x8 build failed; $OUT is installed either way" >&2
else
echo "note: $BUILD8 not found -- only $OUT was built (copy the whole scripts/ dir)" >&2
echo "note: $BUILD8 not found -- only $OUT was built (copy the whole scripts/picocalc/ dir)" >&2
fi
# --- apply live: setfont re-renders the whole console immediately -----------------------
@@ -6,7 +6,7 @@
# LICENCE -- READ THIS FIRST. The base bitmap embedded below is the Linux kernel's own
# font_6x8 (lib/fonts/font_6x8.c), which is GPL-2.0. This script is therefore GPL-2.0-only
# and so is the PSF it produces; the full licence text sits beside it as
# scripts/LICENSE.GPL-2.0. The rest of MeshTerm is Apache-2.0 and stays that way: the
# scripts/picocalc/LICENSE.GPL-2.0. The rest of MeshTerm is Apache-2.0 and stays that way: the
# produced meshterm8.psf.gz is a DATA FILE the Linux kernel console reads with setfont, on
# the device, at run time. MeshTerm never links it, never bundles it, and never
# redistributes it -- it is built on the machine it runs on, from this script, and the
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@ A Seeed XIAO nRF52840 + Wio-SX1262 wired to the Luckfox Lyra's UART1, running Me
companion firmware on `Serial1`, so MeshTerm on the PicoCalc opens `/dev/ttyS1` like any
other serial companion. No BLE, no USB host, no SD-slot sacrifice.
**The step-by-step guide is [`docs/picocalc.md`](../../docs/picocalc.md), Phase 3** — parts,
**The step-by-step guide is [`docs/picocalc.md`](../../../docs/picocalc.md), Phase 3** — parts,
the firmware build and the patch explained, flashing, wiring, the Lyra setup, and what has
only been proven on one bench. What the register poke does is in `uart1-mux.py`'s own
header. This page is the bench card.
@@ -17,13 +17,13 @@ Three steps on two machines:
```bash
# 1. dev machine: build (needs git + PlatformIO)
cd scripts/xiao-radio && sh build-firmware.sh
cd scripts/picocalc/xiao-radio && sh build-firmware.sh
# 2. dev machine: flash, with the XIAO's own USB-C plugged in
python flash.py # double-tap reset if the touch doesn't take
# 3. the Lyra, as root
sh scripts/xiao-radio/lyra-setup.sh # MT_USER=meshterm by default
sh scripts/picocalc/xiao-radio/lyra-setup.sh # MT_USER=meshterm by default
# then, as that user
meshterm
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3 -3
View File
@@ -17,7 +17,7 @@ def test_spdx_headers():
python_files = []
# Collect all Python files from the required directories
for directory in ["meshterm", "tests", "packaging", "scripts/xiao-radio"]:
for directory in ["meshterm", "tests", "packaging", "scripts/picocalc/xiao-radio"]:
dir_path = repo_root / directory
if dir_path.exists():
if directory == "packaging":
@@ -27,8 +27,8 @@ def test_spdx_headers():
else:
python_files.extend(dir_path.rglob("*.py"))
# Also check the extensionless scripts/meshterm-spi-bridge script
spi_bridge = repo_root / "scripts" / "meshterm-spi-bridge"
# Also check the extensionless scripts/uconsole/meshterm-spi-bridge script
spi_bridge = repo_root / "scripts" / "uconsole" / "meshterm-spi-bridge"
if spi_bridge.exists():
python_files.append(spi_bridge)
+7 -2
View File
@@ -22,7 +22,12 @@ from meshterm.ui import theme
from meshterm.ui.fontset import FONT_CODEPOINTS
from meshterm.ui.theme import MESH_THEME, MESH_THEME_16, fold_text, glyph, name_style
_FONT_SCRIPT = Path(__file__).resolve().parent.parent / "scripts" / "calculinux-console-font-6x12.sh"
_FONT_SCRIPT = (
Path(__file__).resolve().parent.parent
/ "scripts"
/ "picocalc"
/ "calculinux-console-font-6x12.sh"
)
# -- the two themes -------------------------------------------------------------------
@@ -133,7 +138,7 @@ def test_deploy_script_carries_the_archived_custom_palette() -> None:
"""
script = _FONT_SCRIPT.read_text(encoding="utf-8")
assert "MESHTERM_CUSTOM_PALETTE" in script, "the opt-in gate vanished"
assert theme.vtrgb_lines() in script, "scripts/calculinux-console-font-6x12.sh vtrgb drifted"
assert theme.vtrgb_lines() in script, f"{_FONT_SCRIPT.name} vtrgb drifted"
for index, (_, _, hex_) in enumerate(theme._VT_SLOTS_CUSTOM):
sequence = f"\\033]P{index:x}{hex_.lstrip('#').lower()}"
assert sequence in script, f"OSC fallback missing slot {index}: {sequence}"