Merge branch 'master' of github.com:markqvist/RNode_Firmware

This commit is contained in:
Mark Qvist 2023-05-03 15:26:49 +02:00
commit c11c466e18
5 changed files with 71 additions and 5 deletions

View file

@ -26,7 +26,7 @@
#define DISP_RST 13
#define DISP_ADDR 0x3D
// #define DISP_ADDR 0x3C
#elif BOARD_MODEL == BOARD_HELTEC32_V2
#elif BOARD_MODEL == BOARD_HELTEC32_V2 || BOARD_MODEL == BOARD_LORA32_V1_0
#define DISP_RST 16
#define DISP_ADDR 0x3C
#define SCL_OLED 15
@ -87,7 +87,7 @@ 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
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 || BOARD_LORA32_V1_0
int pin_display_en = 16;
digitalWrite(pin_display_en, LOW);
delay(50);
@ -95,7 +95,11 @@ bool display_init() {
#elif BOARD_MODEL == BOARD_HELTEC32_V2
Wire.begin(SDA_OLED, SCL_OLED);
#endif
#if BOARD_MODEL == BOARD_LORA32_V1_0
Wire.begin(SDA_OLED, SCL_OLED);
#endif
if(!display.begin(SSD1306_SWITCHCAPVCC, DISP_ADDR)) {
return false;
} else {
@ -106,6 +110,9 @@ bool display_init() {
#elif BOARD_MODEL == BOARD_RNODE_NG_21
disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(3);
#elif BOARD_MODEL == BOARD_LORA32_V1_0
disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(3);
#elif BOARD_MODEL == BOARD_LORA32_V2_0
disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(3);