From bb27cdedb6ad77b257871a32e9a198678c9b27b6 Mon Sep 17 00:00:00 2001 From: agessaman Date: Tue, 27 Jan 2026 12:52:09 -0800 Subject: [PATCH] Fix display header include for heltec_v4 when DISPLAY_CLASS is set directly When DISPLAY_CLASS is defined via build flags but HELTEC_LORA_V4_OLED or HELTEC_LORA_V4_TFT flags aren't set, include SSD1306Display.h as fallback. This fixes compilation errors for environments like heltec_v4_repeater_observer_mqtt that extend Heltec_lora32_v4 directly and set DISPLAY_CLASS=SSD1306Display. --- variants/heltec_v4/target.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/variants/heltec_v4/target.h b/variants/heltec_v4/target.h index 00d2adab6..f9ab0e6a6 100644 --- a/variants/heltec_v4/target.h +++ b/variants/heltec_v4/target.h @@ -13,6 +13,11 @@ #include #elif defined(HELTEC_LORA_V4_TFT) #include +#else + // If DISPLAY_CLASS is defined but OLED/TFT flags aren't set, + // assume SSD1306Display (most common case) + // This handles cases where DISPLAY_CLASS is set directly in build flags + #include #endif #include #endif