#include #include #include #include #include //#include //#include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "geteph.h" #include "rs92gps.h" int LORA_LED = 9; // default POUT for LORA LED used as serial monitor int e; enum MainState { ST_DECODER, ST_SPECTRUM, ST_WIFISCAN, ST_UPDATE }; static MainState mainState = ST_WIFISCAN; // ST_WIFISCAN; AsyncWebServer server(80); AXP20X_Class axp; #define PMU_IRQ 35 String updateHost = "rdzsonde.mooo.com"; int updatePort = 80; String updateBinM = "/master/update.ino.bin"; String updateBinD = "/devel/update.ino.bin"; String *updateBin = &updateBinM; #define LOCALUDPPORT 9002 boolean connected = false; WiFiUDP udp; WiFiClient client; // KISS over TCP für communicating with APRSdroid WiFiServer tncserver(14580); WiFiClient tncclient; boolean forceReloadScreenConfig = false; enum KeyPress { KP_NONE = 0, KP_SHORT, KP_DOUBLE, KP_MID, KP_LONG }; // "doublepress" is now also used to eliminate key glitch on TTGO T-Beam startup (SENSOR_VN/GPIO39) struct Button { uint8_t pin; uint32_t numberKeyPresses; KeyPress pressed; unsigned long keydownTime; int8_t doublepress; bool isTouched; }; Button button1 = {0, 0, KP_NONE, 0, -1, false}; Button button2 = {0, 0, KP_NONE, 0, -1, false}; static int lastDisplay = 1; static int currentDisplay = 1; // timestamp when spectrum display was activated static unsigned long specTimer; // Replaces placeholder with LED state value String processor(const String& var) { Serial.println(var); if (var == "VERSION_NAME") { return String(version_name); } if (var == "VERSION_ID") { return String(version_id); } if (var == "AUTODETECT_INFO") { char tmpstr[128]; const char *fpstr; int i = 0; while (fingerprintValue[i] != sonde.fingerprint && fingerprintValue[i] != -1) i++; if (fingerprintValue[i] == -1) { fpstr = "Unknown board"; } else { fpstr = fingerprintText[i]; } snprintf(tmpstr, 128, "Fingerprint %d (%s)", sonde.fingerprint, fpstr); return String(tmpstr); } return String(); } const String sondeTypeSelect(int activeType) { String sts = ""; for (int i = 0; i < 4; i++) { sts += "