Skip to content

Epic A: Stop depending on patched and external config #153

Closed

Description

@Strycher

Recreated from Strycher/Field_Compass-archive#153 — originally opened by @Strycher on 2026-08-09. Credentials redacted where present.

Parent feature: #151 · Plan: docs/plans/2026-08-09-platformio-hal-design.md

Removes the two hardest out-of-repo dependencies. Still arduino-cli — no toolchain change in this epic. The User_Setup*.h dependency dies in Epic B via build flags.

Why first

The firmware builds on exactly one machine, and one file it needs is a patched vendor library source (TFT_eSPI/TFT_Drivers/ST7796_Rotation.h) that any library upgrade silently reverts.

Key finding

The patch is unnecessary. Its case 1 writes MX|MY|MV|COLOR_ORDER — identical to stock case 3 — and the firmware calls setRotation(1) exactly once, never using rotations 4–7. One line replaces a maintained fork.

Children

A1 rotation fix · A2 vendor lv_conf.h · A3 library manifest · A4 integration test (gates Epic B)

Done when

Stock TFT_eSPI installed fresh, lv_conf.h served from the repo, firmware builds and runs with correct orientation.

Activity

  1. Strycher commented on Sep 7, 2026

    @Strycher
    OwnerAuthor

    @Strycher — 2026-08-09

    Epic A complete — human sign-off received

    Ben, 2026-08-09: integration test #160 "functionally complete and tollgate passed", followed by explicit authorisation to complete the epic.

    Children

    Issue Outcome
    #157 Rotation patch replaced by setRotation(3) in our own source. TFT_eSPI is stock — the vendor-source fork is gone
    #158 lv_conf.h vendored to include/, with scripts/sync-lv-conf.py as a documented bridge and drift check
    #159 Library + toolchain manifest recorded from the compiler's own resolution
    #160 Integration test — verified on hardware

    What the epic actually delivered

    The goal was to stop the build depending on files outside git. The blocking item was TFT_eSPI/TFT_Drivers/ST7796_Rotation.h, a patched vendor source file that existed on exactly one machine and that any library upgrade would silently revert.

    That is resolved without forking the library. The patch turned out to be a pure permutation — its case 1 emitted the identical MADCTL to stock case 3 — so one line of our own source replaced a maintained fork. Confirmed empirically: restoring the stock driver without the source change flipped the display exactly 180 degrees, precisely the MX|MY delta the analysis predicted.

    What it uncovered

    The epic was scoped as "vendor three files." Four unrelated defects were in the way:

    Known gap, carried forward deliberately

    lv_conf.h is still copied into the sketchbook by the sync bridge, and TFT_eSPI's User_Setup_Select.h and Setup_Field_Compass_ESP32S3_ST7789.h still live inside the library folder. arduino-cli cannot serve either from the repo without a machine-specific absolute path.

    Epic #154 retires both via build_flags = -I include -D LV_CONF_INCLUDE_SIMPLE (task B2). Signed off with the gap explicit rather than claimed as clean.

    Unblocks

    Epic #154 — PlatformIO / pioarduino migration.

    Two notes for whoever starts it:

    1. Port pio-flash device-identity guard from meshcore-firmware — prevent wrong-device flashing #172 (pio-flash device-identity guard) should land before B7: Epic B integration test — PlatformIO build on hardware #161. Epic B's integration test is itself a hardware flash, and this machine enumerates six serial devices.
    2. B6's parity baseline now exists. It was specified against "the known-good arduino-cli binary", which did not exist when the plan was written. It does now — the image currently running: flash 1,815,046 (62%), DRAM 103,096 (31%). Capture it before Epic B changes the toolchain.

    Agent: IndigoForge (session b5521fc0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    board:doneBoard sync: Done columnpriority:P0Priority: P0 - Criticaltype:epicParent issue with sub-issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions