touch: wire on-device OTA / beta toggle for the T-Display P4

The update-channel UI (the "Get test builds (beta)" toggle + the Install-update
button) is gated on a non-empty FIRMWARE_OTA_ENV. That is set per-env in
platformio.ini for the 8 S3 boards but was never set for the P4 IDF build, so the
whole update UI was hidden — P4 testers had no way to opt into beta and stayed
stuck reading the stable channel (the beta_49 "no update, 48 up to date" report).

- tdisplay_p4 CMakeLists: define FIRMWARE_OTA_ENV so the UI is shown.
- UITask.cpp: add a P4 branch to OTA_BIN_NAME so the download URL points at
  wadamesh-tdisplay-p4[-lcd].bin, not the V4-TFT bin. AMOLED vs LCD split on
  HAS_TDP4_LCD.

The C6 WiFi shim already routes HTTPClient/Update.h and the P4 partition table has
dual ota_0/ota_1 slots, so the OTA path itself was wired; this only unhides and
correctly targets it. Builds green on P4 (AMOLED) + V4-TFT. On-device toggle/OTA
test still pending (P4 dropped off USB, needs a power cycle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kaj SchittecatandClaude Opus 4.8 committed 2026-07-22 20:52:43 +02:00
1 parent 35d0daf203
commit 71dff36904
2 files changed
+15

No files matched your search

+6
View File
@@ -23793,6 +23793,12 @@ static int wifiScanWatchdogSafe(uint32_t cap_ms, uint16_t per_chan_ms = 300) {
#if defined(ESP32) && defined(MULTI_TRANSPORT_COMPANION) && CAP_OTA
#if defined(HAS_TDECK_GT911)
static const char* const OTA_BIN_NAME = "wadamesh-tdeck";
#elif defined(HAS_TDISPLAY_P4)
#if defined(HAS_TDP4_LCD)
static const char* const OTA_BIN_NAME = "wadamesh-tdisplay-p4-lcd"; // T-Display P4 TFT-LCD SKU
#else
static const char* const OTA_BIN_NAME = "wadamesh-tdisplay-p4"; // T-Display P4 AMOLED SKU
#endif
#else
static const char* const OTA_BIN_NAME = "wadamesh-heltec-v4-tft"; // Heltec V4 TFT (Tanmatsu excluded above)
#endif
+9
View File
@@ -118,3 +118,12 @@ endif()
idf_build_set_property(COMPILE_OPTIONS "-DFIRMWARE_RELEASE_TAG=\"${WADA_FW_TAG}\"" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-DFIRMWARE_BUILD_DATE=\"${WADA_FW_DATE}\"" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-DFIRMWARE_VERSION=\"wadamesh ${WADA_FW_TAG}\"" APPEND)
# On-device OTA / update-channel UI (the "Get test builds (beta)" toggle + the Install-update button
# in UITask.cpp) is gated on a NON-EMPTY FIRMWARE_OTA_ENV. The 8 S3 boards set this per-env in
# platformio.ini; the P4 is an IDF build and must set it here, or the whole update UI stays hidden
# (the symptom testers hit on beta_49: no beta toggle, stuck reading the stable channel). The value is
# only a presence marker — the OTA download URL is built from OTA_BIN_NAME (set per-SKU in UITask.cpp),
# not from this. The P4 partition table has dual ota_0/ota_1 slots and the C6 WiFi shim routes the
# HTTPClient + Update.h writer, so the OTA path itself is wired; this just unhides the UI.
idf_build_set_property(COMPILE_OPTIONS "-DFIRMWARE_OTA_ENV=\"tdisplay_p4\"" APPEND)