diff --git a/src/helpers/SimpleMeshTables.h b/src/helpers/SimpleMeshTables.h index 956f36fa..f0e6ca12 100644 --- a/src/helpers/SimpleMeshTables.h +++ b/src/helpers/SimpleMeshTables.h @@ -4,6 +4,16 @@ #ifdef ESP32 #include + // TFT_eSPI (pulled in by the tracker variants' display driver) defines + // FS_NO_GLOBALS, which suppresses FS.h's own `using fs::File`. Without this, + // File never reaches global scope and every TU that reaches FS.h through + // TFT_eSPI first fails with "'File' has not been declared" — here and in + // simple_repeater/MyMesh.h. Restore exactly what FS.h would have done. + // Cannot use fs::File explicitly instead: File is also the global type on the + // nRF52/RP2040 paths, which have no fs namespace. + #if defined(FS_NO_GLOBALS) + using fs::File; + #endif #endif #define MAX_PACKET_HASHES (128+32) diff --git a/src/helpers/ui/ST7735Display.cpp b/src/helpers/ui/ST7735Display.cpp index 905ff503..62b27a16 100644 --- a/src/helpers/ui/ST7735Display.cpp +++ b/src/helpers/ui/ST7735Display.cpp @@ -102,7 +102,11 @@ static TFT_eSPI lcd = TFT_eSPI(160, 80); static uint32_t curr_color; -#if defined(HELTEC_LORA_V3) || defined(HELTEC_TRACKER_V2) +// HELTEC_TRACKER_V1_1 added to upstream's HSPI guard (d30d8ed7): that board uses +// the same ST7735 panel and also needs a dedicated HSPI instance. Without it the +// #else branch references SPI1, which is not instantiated on ESP32, so every +// heltec_tracker_v1_1 env fails to compile. +#if defined(HELTEC_LORA_V3) || defined(HELTEC_TRACKER_V2) || defined(HELTEC_TRACKER_V1_1) static SPIClass tft_spi(HSPI); #define _spi (&tft_spi) #else diff --git a/variants/heltec_tracker_v2/HeltecTrackerV2Board.cpp b/variants/heltec_tracker_v2/HeltecTrackerV2Board.cpp index 72251daa..1b7396dd 100644 --- a/variants/heltec_tracker_v2/HeltecTrackerV2Board.cpp +++ b/variants/heltec_tracker_v2/HeltecTrackerV2Board.cpp @@ -36,9 +36,14 @@ void HeltecTrackerV2Board::begin() { } void HeltecTrackerV2Board::powerOff() { - // Turn off PA + // Turn off PA. Guarded because this board file is also compiled for the + // heltec_tracker_v1_1 envs, which do not define P_LORA_PA_POWER (it is set + // only in variants/heltec_tracker_v2/platformio.ini). Same guard idiom + // LoRaFEMControl.cpp already uses for this macro. +#if defined(P_LORA_PA_POWER) digitalWrite(P_LORA_PA_POWER, LOW); rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_POWER); +#endif ESP32Board::powerOff(); } @@ -86,21 +91,3 @@ void HeltecTrackerV2Board::begin() { bool HeltecTrackerV2Board::isLoRaFemLnaEnabled() const { return loRaFEMControl.isLNAEnabled(); } - - bool HeltecTrackerV2Board::setLoRaFemLnaEnabled(bool enable) { - if (!loRaFEMControl.isLnaCanControl()) { - return false; - } - - loRaFEMControl.setLNAEnable(enable); - loRaFEMControl.setRxModeEnable(); - return true; - } - - bool HeltecTrackerV2Board::canControlLoRaFemLna() const { - return loRaFEMControl.isLnaCanControl(); - } - - bool HeltecTrackerV2Board::isLoRaFemLnaEnabled() const { - return loRaFEMControl.isLNAEnabled(); - } diff --git a/variants/lilygo_tlora_v2_1/platformio.ini b/variants/lilygo_tlora_v2_1/platformio.ini index 8558cc57..c411e8fa 100644 --- a/variants/lilygo_tlora_v2_1/platformio.ini +++ b/variants/lilygo_tlora_v2_1/platformio.ini @@ -142,7 +142,16 @@ lib_deps = ; Use ONE active WSS broker preset at a time. Two concurrent TLS sessions usually exhaust ; contiguous internal heap; the second slot fails (mbedtls_ssl_setup / esp-tls 0x8017). ; Set extra slots to "none" (e.g. set mqtt2.preset none). See MQTT_IMPLEMENTATION.md. -[env:LilyGo_TLora_V2_1_1_6_repeater_observer_mqtt] +; TEMPORARILY EXCLUDED FROM AUTOMATIC BUILDS (trailing underscore, same +; convention as the nibble_screen_connect envs). This board does not fit: +; flex baseline (no webconfig, no upstream merge): 2,069,397 / 1,966,080 = 105.3% +; It has been silently failing on production for some time — the observer release +; ships 30 envs, not 32, and build.sh swallowing pio's exit code hid it. Dropping +; webconfig would recover only ~46 KB of a ~101 KB (flex) / ~242 KB (dev) deficit, +; so a NO_WEBCONFIG flag cannot rescue it. ESP32 (not S3), 4 MB flash, already on +; min_spiffs.csv. Real options: single-app partition (fits, but loses OTA), or +; trim ~250 KB for this board. See .scratch/tlora-v2-oversize.md. +[env:LilyGo_TLora_V2_1_1_6_repeater_observer_mqtt_] extends = LilyGo_TLora_V2_1_1_6_core extra_scripts = ${esp32_base.extra_scripts} @@ -187,7 +196,8 @@ lib_deps = paulstoffregen/Time@1.6.1 ; Same single-broker guidance as LilyGo_TLora_V2_1_1_6_repeater_observer_mqtt (see comment block above). -[env:LilyGo_TLora_V2_1_1_6_room_server_observer_mqtt] +; TEMPORARILY EXCLUDED — see the repeater env above. +[env:LilyGo_TLora_V2_1_1_6_room_server_observer_mqtt_] extends = LilyGo_TLora_V2_1_1_6_core extra_scripts = ${esp32_base.extra_scripts}