Commit Graph
3 Commits
Author SHA1 Message Date
Dejvino cd688b8abe NetDeck: transparent color-key dither for the freeze tint
- stampImage16_P(): PROGMEM 16bpp stamp with color-key transparency
  (ND_TRANS16 pixels leave the destination untouched) — TFT_eSprite has
  no transparent pushImage variant, so it composites via drawPixel on
  both backends (sprite RAM on device, host framebuffer in the emulator)
- shim: pgm_read_byte/word/dword macros (flash is memory-mapped on
  host and ESP32 alike)
- pattern: 2px checker of black dots + transparent cells — half-visible
  dither, map/units stay readable underneath
- E2E now proves the transparency itself: wall pixels survive under
  transparent cells, dots render black, key color never rendered
2026-11-14 15:33:25 +01:00
Dejvino 83ec0217f4 NetDeck: freeze tint stamps a checkered 8x8 sprite pattern
- replace the nonexistent draw16bppSprite_P(NULL,...) call with
  pushImage(bx, by, 8, 8, checkered8x8): device = TFT_eSprite::pushImage
  (blits into the fb sprite), emulator = new shim TFT_eSPI::pushImage
  blit into the host framebuffer — same signature on both backends
- shim: define PROGMEM (no-op on host/ESP32, flash is memory-mapped)
- pattern data fixed into a real 2px checkerboard (black / 0x1F1F teal)
- E2E pixel assertions updated to the checker geometry

Verified: make netdeck (both targets) + full test suite, 0 failures
2026-11-14 15:24:42 +01:00
Dejvino a1d0730124 NetDeck: headless test runner — unit + integration suites, E2E as separate build
- emulator/tests/: harness.h (TEST/EXPECT framework, input + serial +
  framebuffer helpers), shim_globals.cpp (shim externs for test binaries,
  replacing main.cpp ownership)
- unit_tests.h (14): map/door/LOS/BFS/cover/link state machine/trace/
  spike/reinforcement/win/loss/reset — deterministic fixed-seed, sim
  stepped tick by tick
- integration_tests.h (7): keyboard->pollKeyboard->handleKey pipeline,
  beacon clicks -> squad movement, full network journey via clicks,
  hover-sever (incl. safe sever during trace), daemon gating
- e2e_tests.cpp (separate NetDeck-e2e build): real setup()/loop() journeys
  with device-pipeline input injection (boot grace, 0x55 keyboard, GT911
  tap, trackball ISRs), transcript + pixel assertions (HUD, freeze tint)
- shim SerialSim: opt-in transcript ring for test assertions (off by
  default, interactive emulator unchanged)
- make netdeck-test / -unit / -e2e (root) and make test / test-unit /
  test-e2e (emulator/); tests/README.md documents the structure
- STATUS.md: test-structure note

Verified: make netdeck-test -> 14 unit + 7 integration + 3 E2E, 0 failures
2026-11-14 13:02:41 +01:00