Skip to content

Add 18 animated transitions and native desktop emulator - #17

Open
christyrrell wants to merge 1 commit into
AxisNimble:mainfrom
christyrrell:main
Open

Add 18 animated transitions and native desktop emulator#17
christyrrell wants to merge 1 commit into
AxisNimble:mainfrom
christyrrell:main

Conversation

@christyrrell

Copy link
Copy Markdown

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_TRANSITION in UserConfiguration.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 with make 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant