From f65585a134ca73a308dc8ff186239f6b7bf7fda3 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 19 May 2023 11:05:51 +0200 Subject: [PATCH] Fix display init for Heltec --- Display.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Display.h b/Display.h index 9d60741..5ee4879 100644 --- a/Display.h +++ b/Display.h @@ -87,16 +87,18 @@ void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) { bool display_init() { #if HAS_DISPLAY - #if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 || BOARD_LORA32_V1_0 + #if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 int pin_display_en = 16; digitalWrite(pin_display_en, LOW); delay(50); digitalWrite(pin_display_en, HIGH); #elif BOARD_MODEL == BOARD_HELTEC32_V2 Wire.begin(SDA_OLED, SCL_OLED); - #endif - - #if BOARD_MODEL == BOARD_LORA32_V1_0 + #elif BOARD_MODEL == BOARD_LORA32_V1_0 + int pin_display_en = 16; + digitalWrite(pin_display_en, LOW); + delay(50); + digitalWrite(pin_display_en, HIGH); Wire.begin(SDA_OLED, SCL_OLED); #endif