Changelog
All notable changes to PyHMI. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
0.3.1 2026-11-03
Embedded performance tiers, per-demo firmware, and a full documentation overhaul.
Added
- Per-demo firmware builds -
build_firmware.sh [standard|watch|txt|all]produces one.uf2per demo for the Waveshare RP2350-Touch-LCD-2.8 board, no boot flags;main.pyis generated per build. - TXT demo on RP2350 - the Fischertechnik TXT 4.0 HMI ported to the 2.8" board (
txt_rp2350_28_demo.py): full navigation tree, live clock, scrolling settings, baked RGBA icon registry. Thetxt40demo is a feasibility study demonstrating that PyHMI can port Qt-based applications - such as the application of the Fischertechnik TXT 4.0 Controller - to Linux and MCU platforms. TXT 4.0 is a product and brand of Fischertechnik. - Flush performance tiers (opt-in build flags) -
USE_DMA_FLUSH(byte-wise DMA),USE_SPI16(16-bit DMA frames, the RP2350 PL022 speedup, ~30 ms full frame),USE_PIO_FLUSH(PIO bit-bang at 60 MHz, ~20 ms full frame). The default path is unchanged (~61 ms). Painter.blit_bytes(x, y, w, h, rgba)- bytes-native RGBA blit, C-accelerated viaOP_BLIT_IMAGEwith a pixel-identical Python fallback;IconWidgetuses it with cached nearest-neighbour resampling.prewarm_fonts()- boot-time glyph pre-decode (sizes 10-24) so font tables are allocated before the MicroPython heap fragments.platform/restructure - hardware support moved fromtests/hardware/to board-granularplatform/<board>/directories;tests/is now pure tests.
Changed
- RP2350 demo runtime - demos call
machine.freq(240_000_000)and run withtarget_fps=30;PARTIAL_UPDATEdefaults to true in firmware builds (row-checksum diff flush, 1280 B table). - MicroPython portability - positional
time.localtime()indexing (this build returns a plain tuple), render-time buffers pre-allocated at init (no mid-frameMemoryErroron the fragmented heap). - Documentation fully re-verified against source - backends, architecture, API reference, PyHML language, tutorials, theming and all widget gallery pages; fabricated APIs removed;
api_index.jsonregenerated (131 modules, 247 classes). - Bumped the version from 0.3.0 to 0.3.1 across all source-of-truth files.
Fixed
- PIO ST7789 flush black screen -
pio_sm_set_confignever writes CTRL, so the state machine start address stayed 0; fixed with an explicitpio_sm_exec(pio, sm, pio_encode_jmp(offset)). - DMA flush transferred only 1/4 of the pixels -
DMA_SIZE_32against the one-byte-per-beat SPI FIFO; fixed to byte-wiseDMA_SIZE_8.
0.3.0 2026-10-29
Touch responsiveness and the virtual keyboard on the embedded target.
Added
- VirtualKeyboardInputDialog — a full-screen modal keyboard dialog that opens when a
TextFieldgains focus, echoes typed text live into the originating field (target), and returns it on Enter or restores the original on cancel (x/Escape). Accepts physical keyboard input (SDL / evdev / USB HID) while open. - Compact portrait keyboard —
portrait_smallorientation renders a 5-column x 7-row finger-friendly grid (~45x37 px keys) inspired by the Qt VirtualKeyboard compact layout; landscape keeps the 12-unit 4-row layout. blit_alpha8accelerator op — 8-bit alpha glyph blit exposed on the MicroPythonpyhmi_fbmodule for the scaled-alpha text path.- TXT 4.0 release bundle builder (
scripts/build_txt40_release.py) — stages the library, the C core, and the demo into a self-containeddist/txt40-release/tree and tarball with an auto-installstart-demo.sh.
Fixed
- Interrupt-driven queued touch (CST328) — the INT handler now captures every touch report into a FIFO queue and the input backend drains it each poll, so taps during a long render are no longer missed and drags track every intermediate position.
- Touch stale-coordinate drag — reset
_pos_x/_pos_yon press and release to prevent phantom drags from old coordinates. - TextField focus — emit
FocusInon every click so the virtual keyboard reliably opens on tap. - ListView — draw its background fill and border.
Changed
- 240 MHz overclock on the Waveshare RP2350-Touch-LCD-2.8 firmware (beyond the 150 MHz SDK default) via the board
mpconfigboard.cmakePLL set-point. - Occlusion culling —
render_recursiveskips every sibling beneath a top-most child that fully covers its parent opaquely (a full-screen modal), so the scene behind the keyboard dialog is not rendered. Pixel-identical, only faster (C++ parity). - Per-glyph scaled alpha cache — the 4-bit to 8-bit text alpha is cached per
(font, char)and reused across frames. - Bumped the version from 0.2.1 to 0.3.0 across all source-of-truth files.
0.2.0 2026-09-27
First tagged release. PyHMI is an open-source, royalty-free Python graphics library for building graphical user interfaces that run natively on desktop Linux (framebuffer), embedded microcontrollers (CircuitPython with SPI LCD), and can be emulated in a window on macOS, Linux, and Windows.
Added
- Multi-runtime architecture — one codebase runs on desktop Linux (
/dev/fb0framebuffer), microcontrollers (CircuitPython SPI LCD), and an SDL2 emulation window on macOS/Linux/Windows. - PyHML declarative UI language — an indented, Python-adjacent syntax inspired by Qt QML, with component hierarchy, property binding (
{{ }}), signal handlers (on<Signal>), id references, and layout declarations. QML import loads and renders existing Qt QML designs. - 50+ widgets covering the uGUI, LVGL, TouchGFX, emWin, and Qt/Quick catalogs: basic, input, container, chart/gauge, media, navigation, and specialized widgets, plus user-defined custom elements via class inheritance.
- Layout engine — Flex (row/column with alignment, spacing, stretch) and Grid (rows/columns with span, alignment).
- Core engine — widget tree, event loop, animation engine (easing curves, keyframes), style templates (cascading widget/class/theme), data binding (one-way and two-way, circular-dependency detection), gesture recognizer (swipe, pinch, tap, long-press), scene manager, and dialog manager.
- Graphics abstraction — double-buffered canvas, painter primitives, bitmap + TrueType font rendering (Arimo default, 4-bit grayscale AA), PNG/BMP/GIF image decoding, and desktop JPEG/MP4/MJPEG.
- Display backends — Linux framebuffer (mmap, full color-format matrix), CircuitPython SPI LCD (ST7735/ST7789/ILI9341/HX8357), and SDL2 emulation.
- Input backends — Linux evdev (touchscreen, keyboard, mouse), CircuitPython tinyusb, and SPI/I2C touch controllers.
- C/C++ runtime variant (
src/pyhmi_cpp/) — a C++11 implementation with full feature parity (72 widgets, core modules, backends, parsers), built with CMake for x64/arm64/arm32. - C-accelerated memory graphics core (
src/pyhmi_fb/) — a portable C99 core providing fast memory-graphics primitives as a MicroPython C module, a CPython extension, and shared with the C/C++ runtime. The pure-Python Painter is the always-correct reference; accelerators advertise a capability set and are pixel-identical. - UI Scene Editor — a cross-platform (macOS/Linux/Windows) visual editor for designing PyHML scenes, with a widget-screenshot palette, tree, properties pane, canvas with snap guides, a theme system, and live emulation in a separate window.
- PyHMI Runner — a drag-and-drop app for running
.py/.pyhmlscenes. - Pyodide web variant — PyHMI runs in the browser via a WebCanvas backend and a non-blocking tick architecture.
- Project generator — a CLI that scaffolds a complete project (simple and advanced modes) with VS Code integration.
- HTML to PyHML converter.
- 100+ examples covering every widget, feature, and concept.
- Documentation — API reference, PyHML language reference, widget gallery, backend guides, tutorials, architecture guide, and an agent-readable API index.
- Packaging — Debian packages (Python + C++), Yocto recipes, and 4-platform PyInstaller app builds (editor + runner) in CI.
Added
- i18n module (
src/pyhmi/i18n.py) — internationalization support for multi-language HMI displays. - Alpha blending —
blit_piland the C coreblit_imagesupport per-pixel alpha compositing; newOP_BLIT_IMAGEaccelerator op. - Button image — Button widget renders a Pillow RGBA image when
sourceis set. - TXT 4.0 demo — a complete demo application with custom widgets, PyHML scenes, a Fischertechnik-inspired theme template, and Barlow TTF fonts.
- Windows Docker build —
scripts/build_windows_docker.sh+Dockerfile.windows-buildbuild a single-file Windows.exevia Docker + Wine64. - 43 new widgets completing the 50+ widget catalog.
Fixed
- ScrollView: content clipping, border gating, 2px offset, and double-render ghost.
- Button: drag tracking and click-after-scroll.
- Canvas: content clipping.
- RadioButton: checked-state rendering.
- Editor: scene dimensions, title field, screenshot capture.
- Double-render architecture:
WidgetBase._renders_own_childrenguard for ScrollView, StackView, SwipeView, TileView (C++ parity).
Changed
PyHmi.init()accepts athemekeyword argument;Engine.themeattribute for runtime theme switching.- Parser gained
WidgetBase.registryfallback for custom element lookup. - Bumped the project version from 0.1.0 to 0.2.0 across all source-of-truth files and renamed the Yocto
.bbrecipe files to_0.2.0.bb. - Added a final
bundlestage to the GitLab pipeline that zips all build artifacts into a singlepyhmi-<version>-<commit-short>.zip.
0.1.0
Initial development version: core engine, widget set, PyHML parser, SDL2 backend, C/C++ runtime, and hardware test firmware. Never tagged; superseded by 0.2.0.