Add 18 animated transitions and native desktop emulator - #17
Open
christyrrell wants to merge 1 commit into
Open
Conversation
Extract the display rendering logic from NeoMatrixDisplay into a shared, platform-independent render layer (firmware/render/) that compiles into both the ESP32 firmware and a native desktop emulator. This means the emulator runs the exact same C++ as the device — not a reimplementation. Display engine (firmware/render/): - LedCanvas: logical RGB framebuffer with GFX primitives, no Arduino dependency - ClassicFont.h: authentic Adafruit 5x7 font (1280 bytes, 256 glyphs) - DisplayController: flight cycling state machine (hold → transition → hold), card text layout, and transition orchestration - Transitions: 18 animated styles in three families: * Card-based: right, left, up, down, cover, reveal, diagonal, splitpush, barndoor * Pixel-based: blinds, scanline, crossfade, fadeblack, dissolve * Per-character: splitflap, scramble, cascade, ticker * Plus "cut" for the original instant swap Native desktop emulator (emulator/native/): - SDL2 front-end that compiles the shared firmware render sources - Keyboard controls: arrow keys cycle transitions, N skips flight, Space pauses, brackets adjust speed, up/down adjust brightness - Headless mode (--shot FILE.bmp --transition NAME) for verification - Builds on macOS, Windows (MSYS2/MinGW), and Linux Hardware configuration: - Updated HardwareConfiguration for Mini (128x64, 8x4 tiles of 16x16) - Added DISPLAY_TRANSITION and DISPLAY_TRANSITION_MS config options - NeoMatrixDisplay slimmed to a thin shim over DisplayController - main.cpp calls g_display.update() every loop for smooth animation Tests (firmware/render/host/): - test_canvas: 49 tests covering LedCanvas primitives (setPixel, drawRect, drawChar, drawText, blit, blitRegion, blendCards, bounds, clear) - test_controller: 53 tests covering DisplayController state machine (hold timing, cut/animated transitions, skipToNext, flight replacement, loading screen, renderMessage, configuration) - host_test: transition smoke tests (lit-pixel counts at three progress steps for all 18 styles) - All 102 tests pass on host (no ESP32 required) Documentation: - Main README: added Desktop Emulator section and transition config options - Emulator README: build instructions for all three platforms, keyboard controls, and full transition reference organized by family - Firmware README: updated architecture diagram for render layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
18 transition animations between flights: slides, wipes, dissolves, and departure-board effects (splitflap, scramble, cascade, ticker), plus the original instant cut. Configurable via
DISPLAY_TRANSITIONinUserConfiguration.h.Shared render engine (
firmware/render/): all display logic — framebuffer, text layout, flight cycling state machine, and transitions — extracted into pure C++ with no Arduino dependency. Compiled into both the ESP32 firmware and the desktop emulator from a single source.Native desktop emulator (
emulator/native/): an SDL2 app that runs the actual firmware display code on macOS, Windows, or Linux. Keyboard controls to cycle transitions, adjust speed, and skip flights. Includes a headless mode for automated frame capture.102 unit tests (
firmware/render/host/): cover the framebuffer primitives, the display controller state machine, and all 18 transitions. Run on any PC withmake test— no ESP32 required.Hardware config updated for the Mini (128×64, 8×4 tiles).
No changes to data fetching, networking, or API integration — this only touches the display layer.