From 08bfb013ce36355a5f4e1c83c95069e6c05bbd34 Mon Sep 17 00:00:00 2001 From: Craig Date: Tue, 25 Aug 2026 17:03:01 -0700 Subject: [PATCH] display: fix SCREEN_HEIGHT definition and maxLines for SH1106 OLED --- src/display.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index d07f77a..284b820 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -57,19 +57,20 @@ String lastEpaperText; #else #include + #if defined RPC_LORA_DIGIGATE_1W + #define SCREEN_HEIGHT 32 + #else + #define SCREEN_HEIGHT 64 + #endif + #ifdef HAS_SH1106 #include - Adafruit_SH1106G display(128, 64, &Wire, OLED_RST); + Adafruit_SH1106G display(128, SCREEN_HEIGHT, &Wire, OLED_RST); #else #include #ifdef HELTEC_WSL_V3_DISPLAY - Adafruit_SSD1306 display(128, 64, &Wire1, OLED_RST); + Adafruit_SSD1306 display(128, SCREEN_HEIGHT, &Wire1, OLED_RST); #else - #if defined RPC_LORA_DIGIGATE_1W - #define SCREEN_HEIGHT 32 - #else - #define SCREEN_HEIGHT 64 - #endif Adafruit_SSD1306 display(128, SCREEN_HEIGHT, &Wire, OLED_RST); #endif #endif @@ -107,6 +108,8 @@ void displaySetup() { maxLines = 6; #elif (SCREEN_HEIGHT == 32) maxLines = 3; + #else + maxLines = 6; #endif #ifdef HAS_EPAPER display.landscape();