Files
pictureFrame-firmware/platformio.ini
T
football2801 3fb7eb6ac3 test: add sim-yellow and sim-red envs for visual border verification
Two pio envs that build a tiny sketch reading /img.bin from LittleFS and
calling epd_draw_image_with_border with the chosen color. Lets us verify
the actual on-device pixel composition of the sync-fail (yellow) and
no-WiFi (red) borders without standing up a server failure or pulling
the WiFi cable.

Each sim sets NVS err_border=1 before halting, so flashing back to the
normal env afterwards exercises the 304 → clean repaint recovery path
end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 13:41:22 -04:00

67 lines
2.0 KiB
INI

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
board_build.filesystem = littlefs
lib_deps =
ricmoo/QRCode@^0.0.1
; Flash a single image from firmware/data/img.bin — no WiFi, no server needed.
; 1. pio run -e test-display --target uploadfs (upload the image)
; 2. pio run -e test-display --target upload (upload the sketch)
[env:test-display]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
board_build.filesystem = littlefs
build_flags = -DENV_TEST_DISPLAY
build_src_filter = +<epd.cpp> +<test_display.cpp>
lib_deps =
ricmoo/QRCode@^0.0.1
[env:native-test]
platform = native
lib_deps =
throwtheswitch/Unity@^2.6
build_flags = -DUNIT_TEST -std=c++17 -iquote test/mocks -iquote test -Itest/mocks -Itest
test_build_src = no
; Visual hardware tests for the sync-fail / no-WiFi border. Reads the cached
; /img.bin from LittleFS and draws it with a yellow / red border. Sets
; NVS err_border=1 so the next normal-firmware boot exercises the recovery
; redraw via 304. Flow:
; 1. pio run -e sim-yellow --target upload (see yellow border on hardware)
; 2. pio run -e sim-red --target upload (see red border on hardware)
; 3. pio run -e esp32dev --target upload (back to normal; verifies 304 recovery)
[env:sim-yellow]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
board_build.filesystem = littlefs
build_flags = -DSIM_BORDER -DSIM_BORDER_COLOR=COLOR_YELLOW
build_src_filter = +<epd.cpp> +<sim_border.cpp>
lib_deps =
ricmoo/QRCode@^0.0.1
[env:sim-red]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
board_build.filesystem = littlefs
build_flags = -DSIM_BORDER -DSIM_BORDER_COLOR=COLOR_RED
build_src_filter = +<epd.cpp> +<sim_border.cpp>
lib_deps =
ricmoo/QRCode@^0.0.1