From b12fc82a80f6d9dc40a4a2615cbfba586c8bc85f Mon Sep 17 00:00:00 2001 From: mrmx Date: Sat, 1 Apr 2023 18:27:21 +0200 Subject: [PATCH] fix: OLED initialization and make typo --- Config.h | 4 ++-- Display.h | 9 ++++++++- Makefile | 2 +- README.md | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Config.h b/Config.h index 326c6c8..48e35e4 100644 --- a/Config.h +++ b/Config.h @@ -160,7 +160,7 @@ #define HAS_CONSOLE true #elif BOARD_MODEL == BOARD_LORA32_V1_0 const int pin_cs = 18; - const int pin_reset = 12; + const int pin_reset = 14; const int pin_dio = 26; #if defined(EXTERNAL_LEDS) const int pin_led_rx = 25; @@ -171,7 +171,7 @@ #endif #define HAS_DISPLAY true #define HAS_BLUETOOTH true - #define HAS_CONSOLE true + #define HAS_CONSOLE false #elif BOARD_MODEL == BOARD_LORA32_V2_0 const int pin_cs = 18; const int pin_reset = 12; diff --git a/Display.h b/Display.h index 9dfaa03..c58c005 100644 --- a/Display.h +++ b/Display.h @@ -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); diff --git a/Makefile b/Makefile index 199e948..17bebe8 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ firmware-tbeam: arduino-cli compile --fqbn esp32:esp32:t-beam -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x33\"" firmware-lora32_v10: - arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=\0x39"" + arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x39\"" firmware-lora32_v10_extled: arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x38\" \"-DEXTERNAL_LEDS=true\"" diff --git a/README.md b/README.md index 80f2453..23aebb0 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ The RNode Firmware supports all transceiver modules based on **Semtech SX1276** Support for **SX1262**, **SX1268** and **SX1280** is being implemented. Please support the project with donations if you want this faster! ## Getting Started Fast -You can download and flash the firmware to all the supported boards using the [RNode Config Utility](https://github.com/markqvist/rnodeconfigutil). All firmware releases are now handled and installed directly through the `rnodeconf` utility, which is inclueded in the `rns` package. It can be installed via `pip`: +You can download and flash the firmware to all the supported boards using the [RNode Config Utility](https://github.com/markqvist/rnodeconfigutil). All firmware releases are now handled and installed directly through the `rnodeconf` utility, which is included in the `rns` package. It can be installed via `pip`: ``` # Install rnodeconf via rns package