diff --git a/include/aprs_is_utils.h b/include/aprs_is_utils.h index 23e6a57..7624fa3 100644 --- a/include/aprs_is_utils.h +++ b/include/aprs_is_utils.h @@ -8,10 +8,10 @@ namespace APRS_IS_Utils { void upload(const String& line); void connect(); - + void checkStatus(); String checkForStartingBytes(const String& packet); - + String buildPacketToUpload(const String& packet); bool processReceivedLoRaMessage(const String& sender, const String& packet, bool thirdParty); void processLoRaPacket(const String& packet); diff --git a/include/battery_utils.h b/include/battery_utils.h index 528acf7..b0e9cda 100644 --- a/include/battery_utils.h +++ b/include/battery_utils.h @@ -8,7 +8,7 @@ namespace BATTERY_Utils { void adcCalibration(); void adcCalibrationCheck(); - + void setup(); float checkInternalVoltage(); float checkExternalVoltage(); diff --git a/include/configuration.h b/include/configuration.h index 3139619..4938298 100644 --- a/include/configuration.h +++ b/include/configuration.h @@ -152,7 +152,7 @@ public: WEBADMIN webadmin; NTP ntp; REMOTE_MANAGEMENT remoteManagement; - + void init(); void writeFile(); Configuration(); diff --git a/include/lora_utils.h b/include/lora_utils.h index 8ce71e6..8cabd9c 100644 --- a/include/lora_utils.h +++ b/include/lora_utils.h @@ -13,7 +13,6 @@ namespace LoRa_Utils { void changeFreqTx(); void changeFreqRx(); void wakeRadio(); - //void startReceive(); void sleepRadio(); } diff --git a/include/tnc_utils.h b/include/tnc_utils.h index 7eb1855..a070790 100644 --- a/include/tnc_utils.h +++ b/include/tnc_utils.h @@ -8,7 +8,7 @@ namespace TNC_Utils { void setup(); void loop(); - + void sendToClients(const String& packet); void sendToSerial(const String& packet); diff --git a/include/wifi_utils.h b/include/wifi_utils.h index 22cf1a5..77bf72f 100644 --- a/include/wifi_utils.h +++ b/include/wifi_utils.h @@ -11,7 +11,7 @@ namespace WIFI_Utils { void startWiFi(); void checkAutoAPTimeout(); void setup(); - + } #endif \ No newline at end of file diff --git a/src/A7670_utils.cpp b/src/A7670_utils.cpp index 691fc62..5df345a 100644 --- a/src/A7670_utils.cpp +++ b/src/A7670_utils.cpp @@ -129,7 +129,7 @@ delayATMessage = 0; } else if (ATMessage.indexOf(Config.callsign) >= 3 && !modemLoggedToAPRSIS && response.indexOf("OK") >= 0 && !stationBeacon) { // login info validAT = true; - delayATMessage = 0; + delayATMessage = 0; } else if (ATMessage.indexOf(Config.callsign) == 0 && !beaconSended && response.indexOf("OK") >= 0 && !stationBeacon) { // self beacon or querys validAT = true; i = 1; @@ -203,4 +203,5 @@ delay(1); } } + #endif \ No newline at end of file diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 6e5954c..cc9b41a 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -28,7 +28,7 @@ uint32_t lastRxTime = millis(); bool passcodeValid = false; #ifdef HAS_A7670 - extern bool stationBeacon; + extern bool stationBeacon; #endif @@ -75,7 +75,7 @@ namespace APRS_IS_Utils { wifiState = "--"; } else { wifiState = "AP"; - } + } if (!Config.display.alwaysOn && Config.display.timeout != 0) { displayToggle(true); } @@ -136,7 +136,7 @@ namespace APRS_IS_Utils { ackMessage.concat(packet.substring(packet.indexOf("{") + 1)); ackMessage.trim(); //Serial.println(ackMessage); - + String addToBuffer = Config.callsign; addToBuffer += ">APLRG1"; if (!thirdParty) addToBuffer += ",RFONLY"; diff --git a/src/digi_utils.cpp b/src/digi_utils.cpp index 635f19c..313dc04 100644 --- a/src/digi_utils.cpp +++ b/src/digi_utils.cpp @@ -116,7 +116,7 @@ namespace DIGI_Utils { } } - void processLoRaPacket(const String& packet) { + void processLoRaPacket(const String& packet) { if (packet.indexOf("NOGATE") == -1) { bool thirdPartyPacket = false; String temp, Sender; diff --git a/src/display.cpp b/src/display.cpp index e0a6082..6f9aea6 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -44,7 +44,7 @@ #endif #endif #endif - + extern Configuration Config; bool displayFound = false; diff --git a/src/gps_utils.cpp b/src/gps_utils.cpp index 99434e6..754996c 100644 --- a/src/gps_utils.cpp +++ b/src/gps_utils.cpp @@ -101,7 +101,7 @@ namespace GPS_Utils { } generateBeaconFirstPart(); String encodedGPS = encodeGPS(Config.beacon.latitude, Config.beacon.longitude, Config.beacon.overlay, Config.beacon.symbol); - iGateBeaconPacket += encodedGPS; + iGateBeaconPacket += encodedGPS; iGateLoRaBeaconPacket += encodedGPS; } diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index ffe0fc5..59dce2b 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -199,7 +199,7 @@ namespace LoRa_Utils { } } else { packet = ""; - } + } lastRxTime = millis(); return packet; } diff --git a/src/ota_utils.cpp b/src/ota_utils.cpp index 17f4810..16ed2ed 100644 --- a/src/ota_utils.cpp +++ b/src/ota_utils.cpp @@ -14,14 +14,14 @@ unsigned long ota_progress_millis = 0; namespace OTA_Utils { - + void setup(AsyncWebServer *server) { if (Config.ota.username != "" && Config.ota.password != "") { ElegantOTA.begin(server, Config.ota.username.c_str(), Config.ota.password.c_str()); } else { ElegantOTA.begin(server); } - + ElegantOTA.setAutoReboot(true); ElegantOTA.onStart(onOTAStart); ElegantOTA.onProgress(onOTAProgress); @@ -55,8 +55,8 @@ namespace OTA_Utils { Serial.println(success ? "OTA update finished successfully!" : "There was an error during OTA update!"); displayShow("", "", statusMessage, "", rebootMessage, "", "", 4000); - + isUpdatingOTA = false; } - + } \ No newline at end of file diff --git a/src/power_utils.cpp b/src/power_utils.cpp index 2c66331..87c2ec7 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -232,7 +232,7 @@ namespace POWER_Utils { digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW); #endif #endif - + #ifdef HAS_GPS if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) activateGPS(); #endif @@ -274,7 +274,7 @@ namespace POWER_Utils { delay(500); Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); #endif - + delay(1000); BATTERY_Utils::setup(); BATTERY_Utils::startupBatteryHealth(); diff --git a/src/query_utils.cpp b/src/query_utils.cpp index 295412e..87de3a7 100644 --- a/src/query_utils.cpp +++ b/src/query_utils.cpp @@ -113,7 +113,7 @@ namespace QUERY_Utils { Config.writeFile(); } } - + if (answer == "") return ""; String queryAnswer = Config.callsign; diff --git a/src/sleep_utils.cpp b/src/sleep_utils.cpp index 06c8671..f861598 100644 --- a/src/sleep_utils.cpp +++ b/src/sleep_utils.cpp @@ -27,7 +27,7 @@ namespace SLEEP_Utils { wakeUpFlag = false; } } - + void setup() { if (Config.digi.ecoMode == 1) { pinMode(RADIO_WAKEUP_PIN, INPUT); @@ -56,7 +56,6 @@ namespace SLEEP_Utils { LoRa_Utils::wakeRadio(); esp_light_sleep_start(); } - } void checkSerial() { diff --git a/src/station_utils.cpp b/src/station_utils.cpp index 8c89dff..6893601 100644 --- a/src/station_utils.cpp +++ b/src/station_utils.cpp @@ -58,10 +58,10 @@ namespace STATION_Utils { if (callsign.startsWith(wildcard)) return true; } else { if (list[i] == callsign) return true; - } + } } return false; - } + } bool isBlacklisted(const String& callsign) { return checkCallsignList(blacklist, callsign); @@ -94,7 +94,7 @@ namespace STATION_Utils { lastHeardObjects.emplace_back(LastHeardStation{millis(), object}); // Add new object and Tx return true; } - + void deleteNotHeard() { std::vector lastHeardStation_temp; for (int i = 0; i < lastHeardStations.size(); i++) { @@ -149,13 +149,13 @@ namespace STATION_Utils { return true; } - void processOutputPacketBufferUltraEcoMode() { + void processOutputPacketBufferUltraEcoMode() { size_t currentIndex = 0; while (currentIndex < outputPacketBuffer.size()) { // this sends all packets from output buffer delay(3000); // and cleans buffer to avoid sending packets with time offset LoRa_Utils::sendNewPacket(outputPacketBuffer[currentIndex]); // next time it wakes up currentIndex++; - } + } outputPacketBuffer.clear(); // if (saveNewDigiEcoModeConfig) { diff --git a/src/syslog_utils.cpp b/src/syslog_utils.cpp index 9c09be3..b22be75 100644 --- a/src/syslog_utils.cpp +++ b/src/syslog_utils.cpp @@ -17,7 +17,7 @@ namespace SYSLOG_Utils { String syslogPacket = "<165>1 - "; syslogPacket.concat(Config.callsign); syslogPacket.concat(" CA2RXU_LoRa_iGate_3.0 - - - "); //RFC5424 The Syslog Protocol - + char signalData[35]; snprintf(signalData, sizeof(signalData), " / %ddBm / %.2fdB / %dHz", rssi, snr, freqError); diff --git a/src/tnc_utils.cpp b/src/tnc_utils.cpp index cbc2a1b..d70dfa8 100644 --- a/src/tnc_utils.cpp +++ b/src/tnc_utils.cpp @@ -47,7 +47,7 @@ namespace TNC_Utils { void handleInputData(char character, int bufferIndex) { String* data = (bufferIndex == -1) ? &inputSerialBuffer : &inputServerBuffer[bufferIndex]; if (data->length() == 0 && character != (char)FEND) return; - + data->concat(character); if (character == (char)FEND && data->length() > 3) { diff --git a/src/utils.cpp b/src/utils.cpp index c387cad..9ec92f6 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -189,7 +189,7 @@ namespace Utils { void checkBeaconInterval() { uint32_t lastTx = millis() - lastBeaconTx; if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000) { - beaconUpdate = true; + beaconUpdate = true; } #ifdef HAS_GPS diff --git a/src/web_utils.cpp b/src/web_utils.cpp index 0e35f7c..b732b35 100644 --- a/src/web_utils.cpp +++ b/src/web_utils.cpp @@ -115,7 +115,7 @@ namespace WEB_Utils { Config.wifiAutoAP.password = request->getParam("wifi.autoAP.password", true)->value(); Config.wifiAutoAP.timeout = request->getParam("wifi.autoAP.timeout", true)->value().toInt(); - + Config.aprs_is.active = request->hasParam("aprs_is.active", true); Config.aprs_is.passcode = request->getParam("aprs_is.passcode", true)->value(); @@ -175,7 +175,7 @@ namespace WEB_Utils { Config.battery.externalSleepVoltage = request->getParam("battery.externalSleepVoltage", true)->value().toFloat(); Config.battery.sendVoltageAsTelemetry = request->hasParam("battery.sendVoltageAsTelemetry", true); - + Config.wxsensor.active = request->hasParam("wxsensor.active", true); Config.wxsensor.heightCorrection = request->getParam("wxsensor.heightCorrection", true)->value().toInt(); Config.wxsensor.temperatureCorrection = request->getParam("wxsensor.temperatureCorrection", true)->value().toFloat(); diff --git a/src/wx_utils.cpp b/src/wx_utils.cpp index 466129f..e6f517f 100644 --- a/src/wx_utils.cpp +++ b/src/wx_utils.cpp @@ -71,7 +71,7 @@ namespace WX_Utils { void setup() { if (Config.wxsensor.active) { - getWxModuleAddres(); + getWxModuleAddres(); if (wxModuleAddress != 0x00) { bool wxModuleFound = false; if (wxModuleAddress == 0x76 || wxModuleAddress == 0x77) {