From d267f6699c78510562795dc5893334bd30baaca8 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Wed, 17 Jul 2024 16:20:20 -0400 Subject: [PATCH] HWSL_V3_Display add --- .github/workflows/build.yml | 2 ++ platformio.ini | 11 +++++++++++ src/LoRa_APRS_iGate.cpp | 2 +- src/boards_pinout.h | 7 +++++-- src/display.cpp | 11 +++++++++-- src/power_utils.cpp | 2 +- 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d31ce5..5455961 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,8 @@ jobs: chip: esp32s3 - name: heltec_wireless_stick_lite_v3 chip: esp32s3 + - name: heltec_wireless_stick_lite_v3_display + chip: esp32s3 - name: ESP32_DIY_LoRa chip: esp32 - name: ESP32_DIY_LoRa_915 diff --git a/platformio.ini b/platformio.ini index f698908..82da3e0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -116,6 +116,17 @@ build_flags = lib_deps = ${common.lib_deps} +[env:heltec_wireless_stick_lite_v3_display] +board = esp32-s3-devkitc-1 +board_build.mcu = esp32s3 +build_flags = + -Werror -Wall + -DHELTEC_WSL_V3_DISPLAY + -DHAS_SX1262 + -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 +lib_deps = + ${common.lib_deps} + [env:ESP32_DIY_LoRa] board = esp32dev build_flags = diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index b2d48eb..f1407e6 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -38,7 +38,7 @@ ________________________________________________________________________________ #include "A7670_utils.h" #endif -String versionDate = "2024.07.10"; +String versionDate = "2024.07.17"; Configuration Config; WiFiClient espClient; diff --git a/src/boards_pinout.h b/src/boards_pinout.h index aec372e..38590b1 100644 --- a/src/boards_pinout.h +++ b/src/boards_pinout.h @@ -18,7 +18,7 @@ #define RADIO_BUSY_PIN 26 // GPIO26 - SX1278 IRQ ---->DIO0 #endif -#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WS) +#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WS) #define RADIO_SCLK_PIN 9 // SX1262 SCK #define RADIO_MISO_PIN 11 // SX1262 MISO #define RADIO_MOSI_PIN 10 // SX1262 MOSI @@ -163,13 +163,16 @@ #define BATTERY_PIN 37 #define ADC_CTRL 21 #endif -#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WS) +#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || defined(HELTEC_WS) #define INTERNAL_LED_PIN 35 #define BATTERY_PIN 1 #define VEXT_CTRL 36 #define ADC_CTRL 37 // Heltec WSL_V3 just like Heltec WT #define BOARD_I2C_SDA 41 #define BOARD_I2C_SCL 42 + #ifdef HELTEC_WSL_V3_DISPLAY + #define OLED_RST -1 + #endif #endif #if defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_LoRa_915) || defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915) diff --git a/src/display.cpp b/src/display.cpp index 4fd17f3..06f7d96 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -21,7 +21,11 @@ #if defined(HELTEC_V3) #define OLED_DISPLAY_HAS_RST_PIN #endif - Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST); + #ifdef HELTEC_WSL_V3_DISPLAY + Adafruit_SSD1306 display(128, 64, &Wire1, OLED_RST); + #else + Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST); + #endif #endif #endif @@ -55,7 +59,10 @@ void setup_display() { delay(20); digitalWrite(OLED_RST, HIGH); #endif - Wire.begin(OLED_SDA, OLED_SCL); + + #ifndef HELTEC_WSL_V3_DISPLAY + Wire.begin(OLED_SDA, OLED_SCL); + #endif if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { Serial.println(F("SSD1306 allocation failed")); diff --git a/src/power_utils.cpp b/src/power_utils.cpp index 1056f98..ab6e93e 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -164,7 +164,7 @@ namespace POWER_Utils { Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); #endif - #ifdef HELTEC_V3 + #if defined(HELTEC_V3) || defined(HELTEC_WSL_V3_DISPLAY) Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); #endif