mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-19 11:44:59 +01:00
epaper updated
This commit is contained in:
parent
60aef00b24
commit
5ce8059040
|
|
@ -13,7 +13,7 @@ default_envs = ttgo-lora32-v21
|
|||
|
||||
extra_configs =
|
||||
common_settings.ini
|
||||
variants/*/platformio.ini
|
||||
variants/*/platformio.ini
|
||||
|
||||
[env]
|
||||
platform = espressif32 @ 6.7.0
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ ___________________________________________________________________*/
|
|||
#include "A7670_utils.h"
|
||||
#endif
|
||||
|
||||
String versionDate = "2025.02.25";
|
||||
String versionDate = "2025.02.28";
|
||||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
#ifdef HAS_GPS
|
||||
|
|
@ -68,10 +68,14 @@ uint32_t lastBatteryCheck = 0;
|
|||
bool backUpDigiMode = false;
|
||||
bool modemLoggedToAPRSIS = false;
|
||||
|
||||
#ifdef HAS_EPAPER
|
||||
uint32_t lastEpaperTime = 0;
|
||||
extern String lastEpaperText;
|
||||
#endif
|
||||
|
||||
std::vector<ReceivedPacket> receivedPackets;
|
||||
|
||||
String firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine;
|
||||
|
||||
//#define STARTUP_DELAY 5 //min
|
||||
|
||||
void setup() {
|
||||
|
|
@ -219,7 +223,19 @@ void loop() {
|
|||
|
||||
STATION_Utils::processOutputPacketBuffer();
|
||||
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
#ifdef HAS_EPAPER // Only consider updating every 10 seconds (when data to show is different from before)
|
||||
if(lastEpaperTime == 0 || millis() - lastEpaperTime > 10000) {
|
||||
String posibleEpaperText = firstLine + secondLine + thirdLine + fourthLine + fifthLine + sixthLine + seventhLine;
|
||||
if (lastEpaperText != posibleEpaperText) {
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
lastEpaperText = posibleEpaperText;
|
||||
lastEpaperTime = millis();
|
||||
}
|
||||
}
|
||||
#else
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
#endif
|
||||
|
||||
Utils::checkRebootTime();
|
||||
Utils::checkSleepByLowBatteryVoltage(1);
|
||||
}
|
||||
|
|
@ -322,6 +322,7 @@ namespace APRS_IS_Utils {
|
|||
seventhLine = "QUERY = ";
|
||||
seventhLine += receivedMessage;
|
||||
}
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
} else {
|
||||
Utils::print("Rx Message (APRS-IS): " + packet);
|
||||
if (STATION_Utils::wasHeard(Addressee) && packet.indexOf("EQNS.") == -1 && packet.indexOf("UNIT.") == -1 && packet.indexOf("PARM.") == -1) {
|
||||
|
|
@ -329,9 +330,9 @@ namespace APRS_IS_Utils {
|
|||
displayToggle(true);
|
||||
lastScreenOn = millis();
|
||||
Utils::typeOfPacket(packet, 1); // APRS-LoRa
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
}
|
||||
}
|
||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
} else if (Config.aprs_is.objectsToRF && packet.indexOf(":;") > 0) {
|
||||
Utils::print("Rx Object (APRS-IS) : " + packet);
|
||||
if (STATION_Utils::checkObjectTime(packet)) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
uint16_t redColor = 0xc8a2;
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
//
|
||||
#include <heltec-eink-modules.h>
|
||||
#include "Fonts/FreeSansBold9pt7b.h"
|
||||
EInkDisplay_WirelessPaperV1_1 display;
|
||||
String lastEpaperText;
|
||||
#else
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
|
|
@ -63,7 +66,9 @@ void displaySetup() {
|
|||
#endif
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
//
|
||||
display.landscape();
|
||||
display.printCenter("LoRa APRS iGate Initialising...");
|
||||
display.update();
|
||||
#else
|
||||
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
||||
pinMode(OLED_RST, OUTPUT);
|
||||
|
|
@ -96,7 +101,8 @@ void displayToggle(bool toggle) {
|
|||
digitalWrite(TFT_BL, HIGH);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
// ... to be continued
|
||||
display.printCenter("EPAPER Display Disabled by toggle...");
|
||||
display.update();
|
||||
#else
|
||||
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYON);
|
||||
#endif
|
||||
|
|
@ -106,7 +112,8 @@ void displayToggle(bool toggle) {
|
|||
digitalWrite(TFT_BL, LOW);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
// ... to be continued
|
||||
display.printCenter("Enabled EPAPER Display...");
|
||||
display.update();
|
||||
#else
|
||||
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYOFF);
|
||||
#endif
|
||||
|
|
@ -141,7 +148,16 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||
sprite.pushSprite(0,0);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
// ... to be continued
|
||||
display.clearMemory();
|
||||
display.setCursor(5,10);
|
||||
display.setFont(&FreeSansBold9pt7b);
|
||||
display.println(header);
|
||||
display.setFont(NULL);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
display.setCursor(0, 25 + (14 * i));
|
||||
display.println(*lines[i]);
|
||||
}
|
||||
display.update();
|
||||
#else
|
||||
if (displayFound) {
|
||||
display.clearDisplay();
|
||||
|
|
@ -189,7 +205,17 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||
sprite.pushSprite(0,0);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
// ... to be continued
|
||||
lastEpaperText = header + line1 + line2 + line3 + line4 + line5 + line6;
|
||||
display.clearMemory();
|
||||
display.setCursor(5,10);
|
||||
display.setFont(&FreeSansBold9pt7b);
|
||||
display.println(header);
|
||||
display.setFont(NULL);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
display.setCursor(0, 25 + (14 * i));
|
||||
display.println(*lines[i]);
|
||||
}
|
||||
display.update();
|
||||
#else
|
||||
if (displayFound) {
|
||||
display.clearDisplay();
|
||||
|
|
|
|||
|
|
@ -4,5 +4,7 @@ board_build.mcu = esp32s3
|
|||
build_flags =
|
||||
${common.build_flags}
|
||||
-D HELTEC_WP
|
||||
-D WIRELESS_PAPER
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
${common.lib_deps}
|
||||
todd-herbert/heltec-eink-modules@^4.4.0
|
||||
Loading…
Reference in a new issue