Skip to content

v1.0.0

Latest

Choose a tag to compare

@geeksville geeksville released this 19 Nov 19:16
· 1 commit to main since this release

(apologies for the ai written changelog - but I just checked it and it lgtm)

Touchy-Pad 1.0.0 πŸŽ‰

The first stable release. Everything you need to use Touchy-Pad now comes
from a package manager β€” pip install touchy-pad or cargo add touchy-pad β€”
so you no longer have to clone this repo just to drive a panel. Along the way
this release adds proper rich text, a published list of font sizes you can
change on the fly, and a set of fixes for the ways a panel could get stuck.

Future updates should remain 'wire' compatible so it is very likely that new features won't require reflashing devices (unless you need those particular features).

Covers everything since 0.3.9 (6 Nov 2026 β†’ 19 Nov 2026).
Full details: CHANGELOG.md.


Highlights

1. Rich text β€” several colours in one paragraph

A new span_group widget renders a paragraph as independently styled
runs: each run can have its own colour and font size, with
overflow (clip or ellipsis), a max_lines cap and horizontal text_align.

from touchy_pad.api import span, span_group

span_group(
    "status",
    [
        span("Alert: ", font_size=30),
        span("disk almost full", color=0xFFAA00, font_size=30),
        span(" β€” free up some space", font_size=30),
    ],
)

Live updates stay cheap: setting text to recolour markup
("#RRGGBB run# rest") is re-parsed into runs on the device, one RPC per
frame. A span demo page ships with touchy screen demo, so the on-device page
cycle is now span β†’ test β†’ trackpad.

Also fixed: multi-coloured labels used to corrupt the line they wrapped
on
. With label(recolor=True), a #RRGGBB text# run that an automatic line
break fell inside lost its colour, swallowed the next word, overran its box and
drew the seam twice. That markup is now rendered with real styled runs, so the
bug is gone β€” no host change needed, the wire format is unchanged. Only the
two scrolling label modes keep the old renderer (a scrolling line never wraps,
and span groups can't marquee). Note this can shift a wrapping recoloured
label's line breaks by a word versus the old firmware.

2. Fonts β€” a published list, and change one at runtime

Which sizes actually work is now published, so you get an error instead of a
silent surprise:

from touchy_pad.api import FONT_SIZES   # (8, 14, 16, 24, 30)

label(…, font_size=…), span(…), style(font_size=…) and
build_property_override(…, "text_font", …) now take a size from that set and
raise ValueError for anything else. Previously any number was accepted and
anything unlisted silently rendered at the theme default (14 px) β€” so
font_size=20 looked supported but came out at 14. The list is generated from
the shared protocol definition, so Python, Rust and firmware can never disagree,
and a 24 px Montserrat face is now compiled in for real.

Change a label's font size live, with no screen re-upload:

pad.set_properties([build_property_override("title", "text_font", 30)])
$ touchy property set title text_font 30 --int
pad.set_font_size("title", FontSize::FontSize30).await?;

The change is sticky (survives screen reloads and page swaps) and repaints
immediately; 0 restores the theme font. It also works over the JSON network
API as {"propertyName":"text_font","fontSizeValue":30}.

3. Build your own app β€” no repo checkout required

  • pip install touchy-pad β€” the Python package, with the generated protocol
    bindings already inside the wheel.
  • cargo add touchy-pad β€” the Rust crate is now on crates.io and needs no
    protoc, no build script and no prost-build (the bindings ship in the
    crate). It also gained runnable examples:
    cargo run --example discover|screen|events|image_cache.
  • Better docs for developers and AI coding agents: a "For AI agents" section in
    the crate docs, # Errors sections on every fallible public API, docs.rs built
    with the serial transport, and a single-file
    llms.txt
    orientation guide for writing host code.
  • The README now points people who only want to use Touchy-Pad at the
    published packages, and keeps the source-checkout path for firmware, protocol
    and library work.

4. Reliability β€” a stuck panel now recovers by itself

  • A hard-killed host no longer breaks the next session. If a host app dies
    mid-command, its reply is left sitting in the device's queue, which used to
    make the next session's first screen_save() fail with NOT_FOUND (and
    leak a write transaction). Both the Python and Rust clients now detect that
    stale reply, flush it and retry once. A genuine failure still surfaces as
    IO_ERROR, so real errors aren't masked.
  • A wedged flash write no longer needs a reboot. A file-close with a stale
    handle used to block every later write to flash with IO_ERROR until the
    device was reset. The transaction is now aborted and the device self-heals on
    the next write.
  • Widget overrides survive page changes. Live property overrides (a label
    you update from the host, for example) used to be lost when you switched user
    pages; they now stick across page swaps β€” and a latent crash path is gone.
  • touchy_open() no longer returns a phantom board. A stale reply could be
    read as board info and show up as a 0Γ—0 panel with protocol version 0; that
    reply is now discarded and retried.
  • New Touchy.event_thread_alive. Apps that receive events on the
    background thread can now tell "still polling" from "the reader is gone". An
    unexpected stop is logged with a traceback, a normal close() stays quiet,
    and a callback that raises is logged and isolated so it can't kill the reader.

5. Flashing and install β€” works outside the dev container

  • just flash, just flash-erase, just merge-bin and just flash-merged
    now work on macOS and Linux from a plain source checkout. They previously
    only ran inside the project's dev container (hard-coded ESP-IDF path,
    /host/dev-only port search, Bash 4 mapfile). Set TOUCHY_PORT to choose a
    port; when several candidates are present the scripts refuse to guess rather
    than write to the wrong device.
  • touchy update now finds macOS serial ports (/dev/cu.usbmodem*,
    cu.usbserial*, …) instead of falling back to a blind USB probe.
  • Fixed a dev-container case where the same USB port appeared twice (once as
    /host/dev/…, once as /dev/…) and the flash refused to run.
  • New just firmware-report prints flash/RAM usage for the currently
    configured board + chip, including how full the app partition is.

Upgrading

This release moves the on-wire versions, so update the firmware and the host
library together
:

$ pip install -U touchy-pad          # or: cargo update -p touchy-pad
$ touchy update                     # flash the new firmware

Because the widget format changed, screens uploaded with older firmware may be
discarded when the new firmware loads them (the device validates the version
and deletes a mismatch). If your panel comes up on the built-in default screen
after flashing, just re-push your pages:

$ touchy init         # re-provision the chrome + the baseline trackpad page
$ touchy screen demo  # ...or add the bundled demo pages (test + span)

Your own pages live in F:host/uscr/ and are uploaded from Python
(pad.user_screen_save("home", ...)), so re-run whichever script pushed them.


Thanks

Big thanks to @jellydn for the portable source-checkout flashing and the
background-reader health API, and to everyone who reported the bugs behind this
release's reliability fixes.