From 69cb203a4f0425af82958d6bf097ce45d0f5efe0 Mon Sep 17 00:00:00 2001 From: "Hans P. Reiser" Date: Fri, 12 Apr 2019 18:53:29 +0200 Subject: [PATCH] merging devel changes 0d64f8d..9b0785b --- README.md | 17 ++ RX_FSK/RX_FSK.ino | 364 +++++++++++++++++++++++++++------ RX_FSK/data/index.html | 58 ++++-- RX_FSK/data/networks.txt | 2 + RX_FSK/data/qrg.txt | 8 +- RX_FSK/data/style.css | 47 +++++ Setup.md | 66 ++++++ libraries/SondeLib/Scanner.cpp | 34 ++- libraries/SondeLib/Sonde.cpp | 32 ++- libraries/SondeLib/Sonde.h | 12 +- libraries/SondeLib/aprs.cpp | 286 ++++++++++++++++++++++++++ libraries/SondeLib/aprs.h | 21 ++ 12 files changed, 849 insertions(+), 98 deletions(-) create mode 100644 Setup.md create mode 100644 libraries/SondeLib/aprs.cpp create mode 100644 libraries/SondeLib/aprs.h diff --git a/README.md b/README.md index 0b60bc9..562f1bc 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,20 @@ A SHORT press will switch to the next channel in channels.txt A medium press will active scan the whole band (400..406 MHz) and display a spectrum diagram (each line == 50 kHz) + +## Setup + +Download https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip +and move to your Arduino IDE's libraries directory +Rename to (name without "-master") + +Download https://github.com/me-no-dev/AsyncTCP/archive/master.zip +and move to your Arduino IDE's libraries directory +Rename to (name without "-master") + +Install Arduino ESP32 file system uploader +https://randomnerdtutorials.com/install-esp32-filesystem-uploader-arduino-ide/ +Download https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/download/1.0/ESP32FS-1.0.zip +Move to your Arduino IDE's tools directory + + diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index ec03589..f49d51c 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -7,6 +8,7 @@ #include #include #include +#include //#include //#include @@ -26,6 +28,13 @@ int e; AsyncWebServer server(80); +const char * udpAddress = "192.168.179.21"; +const int udpPort = 9002; + +boolean connected = false; +WiFiUDP udp; + + // Set LED GPIO const int ledPin = 2; // Stores LED state @@ -48,58 +57,29 @@ String processor(const String& var){ return String(); } -void SetupAsyncServer() { -// Route for root / web page - server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ - request->send(200, "text/plain", "Hello, world"); - }); - - server.on("/index.html", HTTP_GET, [](AsyncWebServerRequest *request){ - request->send(SPIFFS, "/index.html", String(), false, processor); - }); - - // Route to load style.css file - server.on("/style.css", HTTP_GET, [](AsyncWebServerRequest *request){ - request->send(SPIFFS, "/style.css", "text/css"); - }); +#define MAX_QRG 10 - // Route to set GPIO to HIGH - server.on("/on", HTTP_GET, [](AsyncWebServerRequest *request){ - digitalWrite(ledPin, HIGH); - request->send(SPIFFS, "/index.html", String(), false, processor); - }); - - // Route to set GPIO to LOW - server.on("/off", HTTP_GET, [](AsyncWebServerRequest *request){ - digitalWrite(ledPin, LOW); - request->send(SPIFFS, "/index.html", String(), false, processor); - }); - - // Start server - server.begin(); +const String sondeTypeSelect(int activeType) { + String sts = ""; + for(int i=0; i<3; i++) { + sts += "