Merge branch 'richonguzman:main' into main
This commit is contained in:
commit
bd3a9f91d6
|
|
@ -61,6 +61,8 @@ jobs:
|
||||||
chip: esp32
|
chip: esp32
|
||||||
- name: WEMOS-D1-R32-RA02
|
- name: WEMOS-D1-R32-RA02
|
||||||
chip: esp32
|
chip: esp32
|
||||||
|
- name: WEMOS_S2_MINI_DIY_LoRa
|
||||||
|
chip: esp32s2
|
||||||
- name: esp32c3_DIY_1W_LoRa
|
- name: esp32c3_DIY_1W_LoRa
|
||||||
chip: esp32c3
|
chip: esp32c3
|
||||||
- name: esp32c3_DIY_1W_LoRa_915
|
- name: esp32c3_DIY_1W_LoRa_915
|
||||||
|
|
@ -108,6 +110,17 @@ jobs:
|
||||||
0xe000 installer/firmware/boot_app0.bin \
|
0xe000 installer/firmware/boot_app0.bin \
|
||||||
0x10000 installer/firmware/firmware.bin \
|
0x10000 installer/firmware/firmware.bin \
|
||||||
0x3D0000 installer/firmware/spiffs.bin
|
0x3D0000 installer/firmware/spiffs.bin
|
||||||
|
elif [ "${{ matrix.target.chip }}" == "esp32s2" ]; then
|
||||||
|
python installer/bin/esptool/esptool.py --chip esp32s2 merge_bin \
|
||||||
|
-o installer/web_factory.bin \
|
||||||
|
--flash_mode dio \
|
||||||
|
--flash_freq 40m \
|
||||||
|
--flash_size 4MB \
|
||||||
|
0x1000 installer/firmware/bootloader.bin \
|
||||||
|
0x8000 installer/firmware/partitions.bin \
|
||||||
|
0xe000 installer/firmware/boot_app0.bin \
|
||||||
|
0x10000 installer/firmware/firmware.bin \
|
||||||
|
0x3D0000 installer/firmware/spiffs.bin
|
||||||
elif [ "${{ matrix.target.chip }}" == "esp32s3" ]; then
|
elif [ "${{ matrix.target.chip }}" == "esp32s3" ]; then
|
||||||
python installer/bin/esptool/esptool.py --chip esp32s3 merge_bin \
|
python installer/bin/esptool/esptool.py --chip esp32s3 merge_bin \
|
||||||
-o installer/web_factory.bin \
|
-o installer/web_factory.bin \
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ __(This iGate Firmware works with all LoRa Tracker Firmwares (specially this <a
|
||||||
|
|
||||||
## Timeline (Versions):
|
## Timeline (Versions):
|
||||||
|
|
||||||
|
- 2024.08.23 Wemos S2 Mini DIY LoRa added.
|
||||||
|
- 2024.08.19 HELTEC Wireless Paper working (still missing Epaper code).
|
||||||
- 2024.08.13 Web Authentication for WebUI. Thanks Mitja S57PNX.
|
- 2024.08.13 Web Authentication for WebUI. Thanks Mitja S57PNX.
|
||||||
- 2024.08.05 WIDE2-n added to WIDE1-n in Digirepeater Modes.
|
- 2024.08.05 WIDE2-n added to WIDE1-n in Digirepeater Modes.
|
||||||
- 2024.06.27 External Voltage Divider Resistor configuration on WebUI. Thanks Tilen S54B.
|
- 2024.06.27 External Voltage Divider Resistor configuration on WebUI. Thanks Tilen S54B.
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ lib_deps =
|
||||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
|
|
||||||
[env:heltec_wireless_stick]
|
[env:heltec_wireless_stick]
|
||||||
board = heltec_wifi_lora_32_V3
|
board = esp32-s3-devkitc-1
|
||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
-Werror -Wall
|
-Werror -Wall
|
||||||
|
|
@ -392,6 +392,18 @@ lib_deps =
|
||||||
adafruit/Adafruit GFX Library @ 1.11.9
|
adafruit/Adafruit GFX Library @ 1.11.9
|
||||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
|
|
||||||
|
[env:WEMOS_S2_MINI_DIY_LoRa]
|
||||||
|
board = lolin_s2_mini
|
||||||
|
build_flags =
|
||||||
|
-Werror -Wall
|
||||||
|
-DWEMOS_S2_MINI_DIY_LoRa
|
||||||
|
-DHAS_SX1278
|
||||||
|
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
adafruit/Adafruit GFX Library @ 1.11.9
|
||||||
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
|
|
||||||
[env:esp32c3_DIY_1W_LoRa]
|
[env:esp32c3_DIY_1W_LoRa]
|
||||||
board = esp32-c3-devkitm-1
|
board = esp32-c3-devkitm-1
|
||||||
board_build.mcu = esp32c3
|
board_build.mcu = esp32c3
|
||||||
|
|
@ -439,3 +451,15 @@ lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
adafruit/Adafruit GFX Library @ 1.11.9
|
adafruit/Adafruit GFX Library @ 1.11.9
|
||||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
|
|
||||||
|
[env:heltec_wireless_paper]
|
||||||
|
board = esp32-s3-devkitc-1
|
||||||
|
board_build.mcu = esp32s3
|
||||||
|
build_flags =
|
||||||
|
-Werror -Wall
|
||||||
|
-DHELTEC_WP
|
||||||
|
-DHAS_SX1262
|
||||||
|
-DHAS_EPAPER
|
||||||
|
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
|
@ -38,7 +38,7 @@ ________________________________________________________________________________
|
||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2024.08.14";
|
String versionDate = "2024.08.21";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ namespace BATTERY_Utils {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3)
|
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
||||||
digitalWrite(ADC_CTRL, LOW);
|
digitalWrite(ADC_CTRL, LOW);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -133,10 +133,15 @@ namespace BATTERY_Utils {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||||
digitalWrite(ADC_CTRL, LOW);
|
digitalWrite(ADC_CTRL, LOW);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3)
|
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP)
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HELTEC_WP
|
||||||
|
double inputDivider = (1.0 / (10.0 + 10.0)) * 10.0; // The voltage divider is a 10k + 10k resistor in series
|
||||||
|
#else
|
||||||
double inputDivider = (1.0 / (390.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
|
double inputDivider = (1.0 / (390.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
|
||||||
|
#endif
|
||||||
return (((sampleSum/100) * adcReadingTransformation) / inputDivider) + 0.285; // Yes, this offset is excessive, but the ADC on the ESP32s3 is quite inaccurate and noisy. Adjust to own measurements.
|
return (((sampleSum/100) * adcReadingTransformation) / inputDivider) + 0.285; // Yes, this offset is excessive, but the ADC on the ESP32s3 is quite inaccurate and noisy. Adjust to own measurements.
|
||||||
#else
|
#else
|
||||||
#ifdef HAS_ADC_CALIBRATION
|
#ifdef HAS_ADC_CALIBRATION
|
||||||
|
|
@ -205,9 +210,11 @@ namespace BATTERY_Utils {
|
||||||
shouldSleepLowVoltage = true;
|
shouldSleepLowVoltage = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HELTEC_WP
|
||||||
if (Config.battery.monitorExternalVoltage && checkExternalVoltage() < Config.battery.externalSleepVoltage + 0.1) {
|
if (Config.battery.monitorExternalVoltage && checkExternalVoltage() < Config.battery.externalSleepVoltage + 0.1) {
|
||||||
shouldSleepLowVoltage = true;
|
shouldSleepLowVoltage = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (shouldSleepLowVoltage) {
|
if (shouldSleepLowVoltage) {
|
||||||
Utils::checkSleepByLowBatteryVoltage(0);
|
Utils::checkSleepByLowBatteryVoltage(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#define RADIO_BUSY_PIN 26 // GPIO26 - SX1278 IRQ ---->DIO0
|
#define RADIO_BUSY_PIN 26 // GPIO26 - SX1278 IRQ ---->DIO0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || 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) || defined(HELTEC_WP)
|
||||||
#define RADIO_SCLK_PIN 9 // SX1262 SCK
|
#define RADIO_SCLK_PIN 9 // SX1262 SCK
|
||||||
#define RADIO_MISO_PIN 11 // SX1262 MISO
|
#define RADIO_MISO_PIN 11 // SX1262 MISO
|
||||||
#define RADIO_MOSI_PIN 10 // SX1262 MOSI
|
#define RADIO_MOSI_PIN 10 // SX1262 MOSI
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
#define RADIO_TXEN 13
|
#define RADIO_TXEN 13
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HELTEC_HTCT62
|
#if defined(HELTEC_HTCT62)
|
||||||
#define RADIO_SCLK_PIN 10 // SX1262 SCK
|
#define RADIO_SCLK_PIN 10 // SX1262 SCK
|
||||||
#define RADIO_MISO_PIN 6 // SX1262 MISO
|
#define RADIO_MISO_PIN 6 // SX1262 MISO
|
||||||
#define RADIO_MOSI_PIN 7 // SX1262 MOSI
|
#define RADIO_MOSI_PIN 7 // SX1262 MOSI
|
||||||
|
|
@ -132,6 +132,15 @@
|
||||||
#define RADIO_TXEN 7
|
#define RADIO_TXEN 7
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WEMOS_S2_MINI_DIY_LoRa
|
||||||
|
#define RADIO_SCLK_PIN 36
|
||||||
|
#define RADIO_MISO_PIN 37
|
||||||
|
#define RADIO_MOSI_PIN 35
|
||||||
|
#define RADIO_CS_PIN 34
|
||||||
|
#define RADIO_BUSY_PIN 38
|
||||||
|
#define RADIO_RST_PIN 33
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// OLED
|
// OLED
|
||||||
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_2_915) || defined(ESP32_DIY_LoRa_A7670_915) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2)
|
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_2_915) || defined(ESP32_DIY_LoRa_A7670_915) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2)
|
||||||
|
|
@ -140,7 +149,7 @@
|
||||||
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HELTEC_V2
|
#if defined(HELTEC_V2)
|
||||||
#define OLED_SDA 4
|
#define OLED_SDA 4
|
||||||
#define OLED_SCL 15
|
#define OLED_SCL 15
|
||||||
#define OLED_RST 16
|
#define OLED_RST 16
|
||||||
|
|
@ -158,7 +167,7 @@
|
||||||
#define OLED_RST -1
|
#define OLED_RST -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HELTEC_HTCT62) && !defined(HELTEC_WSL_V3) && !defined(ESP32C3_DIY_1W_LoRa) && !defined(ESP32C3_DIY_1W_LoRa_915)
|
#if !defined(HELTEC_HTCT62) && !defined(HELTEC_WSL_V3) && !defined(ESP32C3_DIY_1W_LoRa) && !defined(ESP32C3_DIY_1W_LoRa_915) && !defined(WEMOS_S2_MINI_DIY_LoRa)
|
||||||
#define HAS_DISPLAY
|
#define HAS_DISPLAY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -166,6 +175,9 @@
|
||||||
#ifdef HELTEC_HTCT62
|
#ifdef HELTEC_HTCT62
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WEMOS_S2_MINI_DIY_LoRa
|
||||||
|
#define INTERNAL_LED_PIN 15
|
||||||
|
#endif
|
||||||
#if defined(TTGO_T_LORA32_V2_1) || defined(TTGO_T_LORA32_V2_1_915)
|
#if defined(TTGO_T_LORA32_V2_1) || defined(TTGO_T_LORA32_V2_1_915)
|
||||||
#define INTERNAL_LED_PIN 25 // Green Led
|
#define INTERNAL_LED_PIN 25 // Green Led
|
||||||
#define BATTERY_PIN 35
|
#define BATTERY_PIN 35
|
||||||
|
|
@ -179,7 +191,7 @@
|
||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
#define VEXT_CTRL 36
|
||||||
#define ADC_CTRL 37 // Heltec WSL_V3 just like Heltec WT
|
#define ADC_CTRL 37
|
||||||
#define BOARD_I2C_SDA 41
|
#define BOARD_I2C_SDA 41
|
||||||
#define BOARD_I2C_SCL 42
|
#define BOARD_I2C_SCL 42
|
||||||
#ifdef HELTEC_WSL_V3_DISPLAY
|
#ifdef HELTEC_WSL_V3_DISPLAY
|
||||||
|
|
@ -204,6 +216,21 @@
|
||||||
#define BOARD_I2C_SCL 6
|
#define BOARD_I2C_SCL 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HELTEC_WP
|
||||||
|
#define INTERNAL_LED_PIN 18
|
||||||
|
#define BATTERY_PIN 20
|
||||||
|
#define ADC_CTRL 19
|
||||||
|
#define VEXT_CTRL 45
|
||||||
|
#define BOARD_I2C_SDA 37
|
||||||
|
#define BOARD_I2C_SCL 36
|
||||||
|
#define EPAPER_BUSY 7
|
||||||
|
#define EPAPER_RST 6
|
||||||
|
#define EPAPER_DC 5
|
||||||
|
#define EPAPER_CS 4
|
||||||
|
#define EPAPER_SCL 3
|
||||||
|
#define EPAPER_SDA 2
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ESP32_C3_DIY_LoRa // just testing!
|
#ifdef ESP32_C3_DIY_LoRa // just testing!
|
||||||
#define OLED_SDA 8
|
#define OLED_SDA 8
|
||||||
#define OLED_SCL 9
|
#define OLED_SCL 9
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ bool Configuration::readFile() {
|
||||||
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"] | false;
|
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"] | false;
|
||||||
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"] | false;
|
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"] | false;
|
||||||
|
|
||||||
digi.mode = data["digi"]["mode"].as<int>();
|
digi.mode = data["digi"]["mode"] | 0;
|
||||||
|
|
||||||
loramodule.txFreq = data["lora"]["txFreq"] | 433775000;
|
loramodule.txFreq = data["lora"]["txFreq"] | 433775000;
|
||||||
loramodule.rxFreq = data["lora"]["rxFreq"] | 433775000;
|
loramodule.rxFreq = data["lora"]["rxFreq"] | 433775000;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
#define smallSizeFont 1.5
|
#define smallSizeFont 1.5
|
||||||
#define lineSpacing 12
|
#define lineSpacing 12
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#if HAS_EPAPER
|
||||||
|
//
|
||||||
#else
|
#else
|
||||||
#include <Adafruit_GFX.h>
|
#include <Adafruit_GFX.h>
|
||||||
#include <Adafruit_SSD1306.h>
|
#include <Adafruit_SSD1306.h>
|
||||||
|
|
@ -27,6 +30,7 @@
|
||||||
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST);
|
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
|
|
@ -52,6 +56,9 @@ void displaySetup() {
|
||||||
}
|
}
|
||||||
tft.setTextFont(0);
|
tft.setTextFont(0);
|
||||||
tft.fillScreen(TFT_BLACK);
|
tft.fillScreen(TFT_BLACK);
|
||||||
|
#else
|
||||||
|
#if HAS_EPAPER
|
||||||
|
//
|
||||||
#else
|
#else
|
||||||
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
||||||
pinMode(OLED_RST, OUTPUT);
|
pinMode(OLED_RST, OUTPUT);
|
||||||
|
|
@ -60,7 +67,7 @@ void displaySetup() {
|
||||||
digitalWrite(OLED_RST, HIGH);
|
digitalWrite(OLED_RST, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HELTEC_WSL_V3_DISPLAY
|
#if defined(HELTEC_WS) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
Wire.begin(OLED_SDA, OLED_SCL);
|
Wire.begin(OLED_SDA, OLED_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -79,6 +86,7 @@ void displaySetup() {
|
||||||
display.ssd1306_command(1);
|
display.ssd1306_command(1);
|
||||||
display.display();
|
display.display();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
delay(1000);
|
delay(1000);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -88,15 +96,23 @@ void displayToggle(bool toggle) {
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
#ifdef HAS_TFT
|
#ifdef HAS_TFT
|
||||||
digitalWrite(TFT_BL, HIGH);
|
digitalWrite(TFT_BL, HIGH);
|
||||||
|
#else
|
||||||
|
#if HAS_EPAPER
|
||||||
|
// ... to be continued
|
||||||
#else
|
#else
|
||||||
display.ssd1306_command(SSD1306_DISPLAYON);
|
display.ssd1306_command(SSD1306_DISPLAYON);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAS_TFT
|
#ifdef HAS_TFT
|
||||||
digitalWrite(TFT_BL, LOW);
|
digitalWrite(TFT_BL, LOW);
|
||||||
|
#else
|
||||||
|
#if HAS_EPAPER
|
||||||
|
// ... to be continued
|
||||||
#else
|
#else
|
||||||
display.ssd1306_command(SSD1306_DISPLAYOFF);
|
display.ssd1306_command(SSD1306_DISPLAYOFF);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -144,6 +160,9 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
||||||
tft.setCursor(0, ((lineSpacing * (2 + i)) - 2));
|
tft.setCursor(0, ((lineSpacing * (2 + i)) - 2));
|
||||||
tft.print(*lines[i]);
|
tft.print(*lines[i]);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#ifdef HAS_EPAPER
|
||||||
|
// ... to be continued
|
||||||
#else
|
#else
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
|
|
@ -158,6 +177,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
||||||
display.ssd1306_command(1);
|
display.ssd1306_command(1);
|
||||||
display.display();
|
display.display();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
delay(wait);
|
delay(wait);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -178,6 +198,9 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
||||||
tft.setCursor(0, ((lineSpacing * (2 + i)) - 2));
|
tft.setCursor(0, ((lineSpacing * (2 + i)) - 2));
|
||||||
tft.print(*lines[i]);
|
tft.print(*lines[i]);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#ifdef HAS_EPAPER
|
||||||
|
// ... to be continued
|
||||||
#else
|
#else
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
|
|
@ -193,6 +216,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
||||||
display.ssd1306_command(1);
|
display.ssd1306_command(1);
|
||||||
display.display();
|
display.display();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
delay(wait);
|
delay(wait);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -154,17 +154,20 @@ namespace POWER_Utils {
|
||||||
#ifndef HELTEC_WSL_V3
|
#ifndef HELTEC_WSL_V3
|
||||||
digitalWrite(VEXT_CTRL, HIGH);
|
digitalWrite(VEXT_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HELTEC_WP
|
||||||
|
digitalWrite(VEXT_CTRL, LOW);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL
|
||||||
pinMode(ADC_CTRL, OUTPUT);
|
pinMode(ADC_CTRL, OUTPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HELTEC_WIRELESS_TRACKER
|
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WP)
|
||||||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ namespace Utils {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HELTEC_WP
|
||||||
if (Config.battery.sendExternalVoltage || Config.battery.monitorExternalVoltage) {
|
if (Config.battery.sendExternalVoltage || Config.battery.monitorExternalVoltage) {
|
||||||
float externalVoltage = BATTERY_Utils::checkExternalVoltage();
|
float externalVoltage = BATTERY_Utils::checkExternalVoltage();
|
||||||
String externalVoltageInfo = String(externalVoltage,2) + "V";
|
String externalVoltageInfo = String(externalVoltage,2) + "V";
|
||||||
|
|
@ -169,6 +170,7 @@ namespace Utils {
|
||||||
shouldSleepLowVoltage = true;
|
shouldSleepLowVoltage = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
|
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
|
||||||
Utils::println("-- Sending Beacon to APRSIS --");
|
Utils::println("-- Sending Beacon to APRSIS --");
|
||||||
|
|
@ -245,7 +247,7 @@ namespace Utils {
|
||||||
} else if (packet[firstColonIndex + 1] == '>') {
|
} else if (packet[firstColonIndex + 1] == '>') {
|
||||||
sixthLine += "> NEW STATUS";
|
sixthLine += "> NEW STATUS";
|
||||||
seventhLine = seventhLineHelper;
|
seventhLine = seventhLineHelper;
|
||||||
} else if (packet[firstColonIndex + 1] == '!' || packet[firstColonIndex + 1] == '=') {
|
} else if (packet[firstColonIndex + 1] == '!' || packet[firstColonIndex + 1] == '=' || packet[firstColonIndex + 1] == '@') {
|
||||||
sixthLine += "> GPS BEACON";
|
sixthLine += "> GPS BEACON";
|
||||||
if (!Config.syslog.active) {
|
if (!Config.syslog.active) {
|
||||||
GPS_Utils::getDistanceAndComment(packet); // to be checked!!!
|
GPS_Utils::getDistanceAndComment(packet); // to be checked!!!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue