Unify Heltec V4 OLED, TFT and headless display selection

Detect OLED or the original stock TFT touch assembly in ordinary V4.2/V4.3
images. Add saved live display.type auto/oled/tft/off selection and report
the active selection in board output. Keep sensors on primary I2C, preserve
shared power, and isolate TFT FSPI from radio HSPI through sleep and changes.

Consolidate future picker/build choices only with application capability
proof. Retain exact legacy OTA identities and separate R8 hardware images.
Document controls and physical qualification limits.

Validation: five serialized Full builds with capability/size/RAM checks;
focused host tests, existing R8/T-Deck/OLED regressions, build-profile suite,
and picker/provider tests. V4.3 OLED live changes and off/auto reboot
persistence passed on Mercerwood. Physical TFT qualification remains pending.
This commit is contained in:
mikecarper committed 2026-10-26 15:19:17 -07:00
1 parent 5b5708283d
commit b00d346df7
43 files changed
+2123 -76

No files matched your search

+15
View File
@@ -5,6 +5,9 @@
#include <helpers/IdentityGeneration.h>
#include <helpers/ui/StartupScreen.h>
#include <helpers/ui/DisplayPowerSettings.h>
#if defined(HELTEC_V4_DISPLAY_UNIFIED) && HELTEC_V4_DISPLAY_UNIFIED && defined(DISPLAY_CLASS)
#include <helpers/ui/HeltecV4DisplaySettings.h>
#endif
#if defined(OLED_AUTO_DETECT) && OLED_AUTO_DETECT
#include <helpers/ui/OLEDControllerSettings.h>
#endif
@@ -179,6 +182,9 @@ void setup() {
mesh::RadioProfileCLI::configureBootTuning(regulator_prefs_fs, radio_driver);
#ifdef DISPLAY_CLASS
mesh::ui::loadDisplayPowerSettings(fs, false);
#if defined(HELTEC_V4_DISPLAY_UNIFIED) && HELTEC_V4_DISPLAY_UNIFIED
mesh::ui::loadHeltecV4DisplaySettings(regulator_prefs_fs, display);
#endif
#if defined(OLED_AUTO_DETECT) && OLED_AUTO_DETECT
mesh::ui::loadOLEDControllerSettings(regulator_prefs_fs);
#endif
@@ -294,6 +300,11 @@ void setup() {
#endif
#ifdef DISPLAY_CLASS
#if defined(HELTEC_V4_DISPLAY_UNIFIED) && HELTEC_V4_DISPLAY_UNIFIED
// Initialize the UI dependency even when auto detection found no screen.
// A later saved display.type change can enable it without restarting.
display_ready = true;
#endif
if (display_ready) {
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
}
@@ -376,7 +387,11 @@ void loop() {
const bool morse_timing = mesh::morseTimingActive(&radio_driver);
if (!morse_timing) sensors.loop();
#ifdef DISPLAY_CLASS
#if defined(HELTEC_V4_DISPLAY_UNIFIED) && HELTEC_V4_DISPLAY_UNIFIED
if (display.selectedType() != mesh::ui::HeltecV4DisplayType::None) ui_task.loop();
#else
if (display_ready) ui_task.loop();
#endif
#endif
rtc_clock.tick();
if (mesh::serviceUsbLoggingWatchdog(usbLoggingRecoverySafe)) board.reboot();