fix: OLED initialization and make typo

This commit is contained in:
mrmx 2023-04-01 18:27:21 +02:00
parent c59d07efb8
commit b12fc82a80
4 changed files with 12 additions and 5 deletions

View File

@ -160,7 +160,7 @@
#define HAS_CONSOLE true #define HAS_CONSOLE true
#elif BOARD_MODEL == BOARD_LORA32_V1_0 #elif BOARD_MODEL == BOARD_LORA32_V1_0
const int pin_cs = 18; const int pin_cs = 18;
const int pin_reset = 12; const int pin_reset = 14;
const int pin_dio = 26; const int pin_dio = 26;
#if defined(EXTERNAL_LEDS) #if defined(EXTERNAL_LEDS)
const int pin_led_rx = 25; const int pin_led_rx = 25;
@ -171,7 +171,7 @@
#endif #endif
#define HAS_DISPLAY true #define HAS_DISPLAY true
#define HAS_BLUETOOTH true #define HAS_BLUETOOTH true
#define HAS_CONSOLE true #define HAS_CONSOLE false
#elif BOARD_MODEL == BOARD_LORA32_V2_0 #elif BOARD_MODEL == BOARD_LORA32_V2_0
const int pin_cs = 18; const int pin_cs = 18;
const int pin_reset = 12; const int pin_reset = 12;

View File

@ -95,7 +95,11 @@ bool display_init() {
#elif BOARD_MODEL == BOARD_HELTEC32_V2 #elif BOARD_MODEL == BOARD_HELTEC32_V2
Wire.begin(SDA_OLED, SCL_OLED); Wire.begin(SDA_OLED, SCL_OLED);
#endif #endif
#if BOARD_MODEL == BOARD_LORA32_V1_0
Wire.begin(SDA_OLED, SCL_OLED);
#endif
if(!display.begin(SSD1306_SWITCHCAPVCC, DISP_ADDR)) { if(!display.begin(SSD1306_SWITCHCAPVCC, DISP_ADDR)) {
return false; return false;
} else { } else {
@ -106,6 +110,9 @@ bool display_init() {
#elif BOARD_MODEL == BOARD_RNODE_NG_21 #elif BOARD_MODEL == BOARD_RNODE_NG_21
disp_mode = DISP_MODE_PORTRAIT; disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(3); 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 #elif BOARD_MODEL == BOARD_LORA32_V2_0
disp_mode = DISP_MODE_PORTRAIT; disp_mode = DISP_MODE_PORTRAIT;
display.setRotation(3); display.setRotation(3);

View File

@ -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\"" 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: 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: 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\"" 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\""

View File

@ -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! Support for **SX1262**, **SX1268** and **SX1280** is being implemented. Please support the project with donations if you want this faster!
## Getting Started Fast ## 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 # Install rnodeconf via rns package