mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-10-31 02:51:58 +01:00
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:
1 file changed
+10
-7
+10
-7
@@ -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();
|
||||||
|
|||||||
Reference in new issue
Block a user