mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-21 04:35:33 +01:00
minor cosmetic code fix
This commit is contained in:
parent
414b31d9b8
commit
72c16e1cd0
|
|
@ -13,6 +13,7 @@ float R2 = 27.000; //in Kilo-Ohms
|
|||
float readingCorrection = 0.125;
|
||||
float multiplyCorrection = 0.035;
|
||||
|
||||
|
||||
namespace BATTERY_Utils {
|
||||
|
||||
float checkBattery() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include "display.h"
|
||||
|
||||
|
||||
|
||||
void Configuration::writeFile() {
|
||||
Serial.println("Saving config..");
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ extern String fifthLine;
|
|||
extern String sixthLine;
|
||||
extern String seventhLine;
|
||||
|
||||
|
||||
namespace DIGI_Utils {
|
||||
|
||||
String generateDigiRepeatedPacket(String packet, String callsign) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ extern WiFiClient espClient;
|
|||
extern int stationMode;
|
||||
String distance;
|
||||
|
||||
|
||||
namespace GPS_Utils {
|
||||
|
||||
String double2string(double n, int ndec) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ bool enableInterrupt = true;
|
|||
int rssi, freqError;
|
||||
float snr;
|
||||
|
||||
|
||||
namespace LoRa_Utils {
|
||||
|
||||
void setFlag(void) {
|
||||
|
|
@ -181,16 +182,17 @@ namespace LoRa_Utils {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
// // // // // //
|
||||
|
||||
if ((loraPacket.indexOf("\0")!=-1) || (loraPacket.indexOf("\r")!=-1) || (loraPacket.indexOf("\n")!=-1)) {
|
||||
loraPacket = packetSanitization(loraPacket);
|
||||
}
|
||||
// // // // // //
|
||||
|
||||
#ifndef TextSerialOutputForApp
|
||||
if (loraPacket!="") {
|
||||
Serial.println("(RSSI:" +String(rssi) + " / SNR:" + String(snr) + " / FreqErr:" + String(freqError) + ")");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Config.syslog.active && (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status()==WL_CONNECTED)) && loraPacket!="") {
|
||||
SYSLOG_Utils::log("Rx", loraPacket, rssi, snr, freqError);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,15 @@
|
|||
#include <ElegantOTA.h>
|
||||
#include <AsyncTCP.h>
|
||||
#include "configuration.h"
|
||||
#include "display.h"
|
||||
#include "ota_utils.h"
|
||||
#include "display.h"
|
||||
|
||||
extern Configuration Config;
|
||||
extern uint32_t lastScreenOn;
|
||||
|
||||
unsigned long ota_progress_millis = 0;
|
||||
|
||||
|
||||
namespace OTA_Utils {
|
||||
|
||||
void setup(AsyncWebServer *server) {
|
||||
|
|
@ -53,4 +54,5 @@ namespace OTA_Utils {
|
|||
show_display("", "", " OTA update fail!", "", "", "", "", 4000);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -114,4 +114,5 @@ NSS 18
|
|||
DIO0 26
|
||||
REST 14
|
||||
GND - */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -16,4 +16,4 @@ namespace POWER_Utils {
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -8,6 +8,7 @@ extern std::vector<String> lastHeardStation_temp;
|
|||
extern String versionDate;
|
||||
extern int stationMode;
|
||||
|
||||
|
||||
namespace QUERY_Utils {
|
||||
|
||||
String process(String query, String station, String queryOrigin) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ extern std::vector<String> packetBuffer;
|
|||
extern std::vector<String> packetBuffer_temp;
|
||||
extern String fourthLine;
|
||||
|
||||
|
||||
namespace STATION_Utils {
|
||||
|
||||
void deleteNotHeard() {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ extern int stationMode;
|
|||
|
||||
WiFiUDP udpClient;
|
||||
|
||||
|
||||
namespace SYSLOG_Utils {
|
||||
|
||||
void log(String type, String packet, int rssi, float snr, int freqError) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Utils {
|
|||
|
||||
String getLocalIP() {
|
||||
if (!WiFiConnected) {
|
||||
return "IP : 192.168.4.1";
|
||||
return "IP : 192.168.4.1";
|
||||
} else {
|
||||
return "IP : " + String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(WiFi.localIP()[3]);
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ namespace Utils {
|
|||
digitalWrite(internalLedPin,HIGH);
|
||||
#endif
|
||||
Serial.println("\nStarting Station: " + Config.callsign + " Version: " + versionDate);
|
||||
show_display(" LoRa APRS", "", " ( iGATE & Digi )", "", "", "Richonguzman / CA2RXU", " " + versionDate, 4000);
|
||||
show_display(" LoRa APRS", "", " ( iGATE & DIGI )", "", "", "Richonguzman / CA2RXU", " " + versionDate, 4000);
|
||||
#if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(HELTEC_V3) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa)
|
||||
digitalWrite(internalLedPin,LOW);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "configuration.h"
|
||||
#include "ota_utils.h"
|
||||
#include "web_utils.h"
|
||||
#include "configuration.h"
|
||||
|
||||
extern Configuration Config;
|
||||
|
||||
|
|
@ -24,6 +24,7 @@ extern const char web_bootstrap_js[] asm("_binary_data_embed_bootstrap_js_gz_sta
|
|||
extern const char web_bootstrap_js_end[] asm("_binary_data_embed_bootstrap_js_gz_end");
|
||||
extern const size_t web_bootstrap_js_len = web_bootstrap_js_end - web_bootstrap_js;
|
||||
|
||||
|
||||
namespace WEB_Utils {
|
||||
|
||||
AsyncWebServer server(80);
|
||||
|
|
@ -189,4 +190,5 @@ namespace WEB_Utils {
|
|||
|
||||
server.begin();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ extern bool WiFiConnected;
|
|||
extern long WiFiAutoAPTime;
|
||||
extern bool WiFiAutoAPStarted;
|
||||
|
||||
|
||||
namespace WIFI_Utils {
|
||||
|
||||
void checkWiFi() {
|
||||
|
|
@ -143,7 +144,7 @@ namespace WIFI_Utils {
|
|||
Config.writeFile();
|
||||
|
||||
ESP.restart();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue