fix(13e6): 180° rotate setup screens for ribbon-at-bottom mounting

Matches the server-side V2 physicalRotationDegrees=180° introduced in
pictureFrame-webApp@b355572. The setup screens are firmware-drawn (not
server-rendered) so they need their own compensation:

- scripts/gen_screens_13e6.py rotates the PIL image 180° in save_bin()
  before packing to 4bpp; preview PNGs reflect the rotated layout too.
- All three bg .bins regenerated (ap_bg, ap_bg_retry, setup_bg).
- epd_driver.cpp QR overlay coords updated to the post-rotation
  positions (AP 642,590 → 40,492; Setup 313,750 → 313,276).
- PANEL_FW_VERSION → v1.0.2

To deploy: pio run -e <env> -t upload AND pio run -e <env> -t uploadfs
so the rotated .bins land in LittleFS alongside the new code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-17 13:19:52 -04:00
parent fc1367fc55
commit 55ee5aa95c
9 changed files with 24 additions and 8 deletions
+9 -3
View File
@@ -444,14 +444,20 @@ static void draw_from_lfs(const char* path, uint8_t fallback_color,
// rectangle exactly the size of QR_MODS × QR_CELL at (X, Y), and the
// firmware paints the live QR into it. Mismatch = the QR draws over
// decorative borders or the QR placeholder shows through.
//
// Coords are post-180°-rotation: the gen script rotates each .bin to
// compensate for the panel's ribbon-at-bottom physical mounting, so
// QR placeholders move to (W - old_x - QR_PX, H - old_y - QR_PX).
// AP (518 px QR): pre-rot 642,590 → post-rot 40,492
// Setup (574 px QR): pre-rot 313,750 → post-rot 313,276 (X centred)
void epd_draw_ap_screen(QRCode* qr) {
draw_from_lfs("/ap_bg.bin", COLOR_YELLOW, qr, 642, 590, 14);
draw_from_lfs("/ap_bg.bin", COLOR_YELLOW, qr, 40, 492, 14);
}
void epd_draw_ap_screen_retry(QRCode* qr) {
draw_from_lfs("/ap_bg_retry.bin", COLOR_RED, qr, 642, 590, 14);
draw_from_lfs("/ap_bg_retry.bin", COLOR_RED, qr, 40, 492, 14);
}
void epd_draw_setup_screen(QRCode* qr) {
draw_from_lfs("/setup_bg.bin", COLOR_GREEN, qr, 313, 750, 14);
draw_from_lfs("/setup_bg.bin", COLOR_GREEN, qr, 313, 276, 14);
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Panel-specific firmware version for the Waveshare 13.3" Spectra-6 driver.
// Bump on each driver change worth correlating with server-side reports.
// Independent of the shared firmware version (HTTP / NVS / sleep / etc.).
#define PANEL_FW_VERSION "v1.0.1"
#define PANEL_FW_VERSION "v1.0.2"