MeshTerm starts from the Cardputer Zero's launcher, on its own battery
Tried on a real Cardputer Zero for the first time. It draws on the panel, takes the keyboard, and opens from M5's app launcher: scripts/cardputer-zero/launcher-entry.sh puts a source checkout there (and `remove` takes it off) until there is a store package. Three things the hardware showed: - The splash opened with the highlight on /dev/ttyS0, the Cap's GPS UART, because serial is listed first as found. Below the companions we've used, anything that looks like one now comes before a port nothing vouches for, across transports. - The title bar's battery is the handheld's own BQ27220, as the PicoCalc's is. The host pack is now found by what it is (a Battery supply that isn't a peripheral's), not by the PicoCalc's name. - While the Cap is powered, I2C bus 1 turns noisy: a quarter to three quarters of the gauge's reads fail with an I/O error (one in ten of the clock's), none with the header off. A failed read is asked again, a status that won't read keeps its last verdict, and a good reading stands through six failed polls instead of blinking out. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
85315dc3b7
commit
3333201df8
10 files changed
+317
-51
No files matched your search
@@ -5,6 +5,7 @@ Repo-side tools. None of these ship in the wheel.
|
||||
| Script | What it is for |
|
||||
|---|---|
|
||||
| `basemap-doctor.py` | Why a user's map has no basemap — certificates, DNS, proxy, or colour depth |
|
||||
| `cardputer-zero/` | `launcher-entry.sh` puts a source checkout on the Cardputer Zero's app launcher (and `remove` takes it off), until there is a store package; `meshterm.png` is its placeholder icon |
|
||||
| `picocalc-lyra/` | Calculinux device setup: console font, palette, Wi-Fi; `xiao-radio/` is the XIAO radio kit (firmware build, flashing, UART setup) |
|
||||
| `uconsole/` | The uConsole's always-on SPI bridge service (MeshTerm can also drive that radio directly, with no script at all — see `docs/devices/uconsole.md`) |
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# launcher-entry -- put MeshTerm on the Cardputer Zero's app launcher, from a checkout.
|
||||
#
|
||||
# Usage: scripts/cardputer-zero/launcher-entry.sh [install|remove]
|
||||
#
|
||||
# The stock launcher (APPLaunch) lists what it finds in
|
||||
# /usr/share/APPLaunch/applications. An entry with Terminal=false gets the panel and the
|
||||
# keyboard to itself, the launcher naming them in APPLAUNCH_LINUX_FBDEV_DEVICE and
|
||||
# APPLAUNCH_LINUX_KEYBOARD_DEVICE -- which is how `python -m meshterm.emulator` knows to
|
||||
# draw on the panel rather than open a window. Holding Esc for three seconds still ends it:
|
||||
# the launcher sends SIGTERM, and MeshTerm takes that as a quit.
|
||||
#
|
||||
# This is the developer's entry, run from a source checkout with its venv at .venv (see
|
||||
# docs/devices/cardputer-zero.md). It writes into /usr/share, so it asks sudo for the two
|
||||
# files and nothing else, then restarts the launcher so the icon appears. A store package
|
||||
# will replace it; `remove` takes it out again.
|
||||
set -eu
|
||||
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
CHECKOUT=$(cd "$HERE/../.." && pwd)
|
||||
PYTHON="$CHECKOUT/.venv/bin/python"
|
||||
APPS=/usr/share/APPLaunch/applications
|
||||
IMAGES=/usr/share/APPLaunch/share/images
|
||||
|
||||
case "${1:-install}" in
|
||||
install)
|
||||
if [ ! -d "$APPS" ]; then
|
||||
echo "no $APPS here -- this is for the Cardputer Zero's stock launcher" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! "$PYTHON" -c "import meshterm.emulator" 2>/dev/null; then
|
||||
echo "$PYTHON can't import MeshTerm -- make the venv first:" >&2
|
||||
echo " python3 -m venv .venv && .venv/bin/pip install -e '.[spi]'" >&2
|
||||
exit 1
|
||||
fi
|
||||
entry=$(mktemp)
|
||||
cat >"$entry" <<EOF
|
||||
[Desktop Entry]
|
||||
Name=MeshTerm
|
||||
Exec=$PYTHON -m meshterm.emulator
|
||||
Icon=share/images/meshterm.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
EOF
|
||||
sudo install -m 644 "$entry" "$APPS/meshterm.desktop"
|
||||
sudo install -m 644 "$HERE/meshterm.png" "$IMAGES/meshterm.png"
|
||||
rm -f "$entry"
|
||||
echo "installed $APPS/meshterm.desktop (runs $PYTHON)"
|
||||
;;
|
||||
remove)
|
||||
sudo rm -f "$APPS/meshterm.desktop" "$IMAGES/meshterm.png"
|
||||
echo "removed MeshTerm from the launcher"
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [install|remove]" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${1:-install}" = install ] && [ ! -f "$HOME/.meshterm/fonts/ter-u12n.bdf" ]; then
|
||||
echo "fetch the screen's font once: $CHECKOUT/.venv/bin/meshterm emulate --fetch-fonts"
|
||||
fi
|
||||
systemctl --user restart APPLaunch.service 2>/dev/null || echo "restart the launcher to see the change"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
Reference in new issue
Block a user