Merge pull request #456 from cwb/fix-oled-screen-height

display: fix SCREEN_HEIGHT definition and maxLines for SH1106 OLED
This commit is contained in:
Ricardo Guzman authored and GitHub committed 2026-09-07 10:52:20 -03:00
commit c952ea0159
1 file changed
+10 -7
+10 -7
View File
@@ -57,19 +57,20 @@
String lastEpaperText; String lastEpaperText;
#else #else
#include <Adafruit_GFX.h> #include <Adafruit_GFX.h>
#if defined RPC_LORA_DIGIGATE_1W
#define SCREEN_HEIGHT 32
#else
#define SCREEN_HEIGHT 64
#endif
#ifdef HAS_SH1106 #ifdef HAS_SH1106
#include <Adafruit_SH110X.h> #include <Adafruit_SH110X.h>
Adafruit_SH1106G display(128, 64, &Wire, OLED_RST); Adafruit_SH1106G display(128, SCREEN_HEIGHT, &Wire, OLED_RST);
#else #else
#include <Adafruit_SSD1306.h> #include <Adafruit_SSD1306.h>
#ifdef HELTEC_WSL_V3_DISPLAY #ifdef HELTEC_WSL_V3_DISPLAY
Adafruit_SSD1306 display(128, 64, &Wire1, OLED_RST); Adafruit_SSD1306 display(128, SCREEN_HEIGHT, &Wire1, OLED_RST);
#else #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); Adafruit_SSD1306 display(128, SCREEN_HEIGHT, &Wire, OLED_RST);
#endif #endif
#endif #endif
@@ -107,6 +108,8 @@ void displaySetup() {
maxLines = 6; maxLines = 6;
#elif (SCREEN_HEIGHT == 32) #elif (SCREEN_HEIGHT == 32)
maxLines = 3; maxLines = 3;
#else
maxLines = 6;
#endif #endif
#ifdef HAS_EPAPER #ifdef HAS_EPAPER
display.landscape(); display.landscape();