kill white spaces

This commit is contained in:
richonguzman
2025-05-18 08:44:46 -04:00
parent 9baf066386
commit 194ae94a43
22 changed files with 34 additions and 35 deletions

View File

@@ -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);

View File

@@ -8,7 +8,7 @@ namespace BATTERY_Utils {
void adcCalibration();
void adcCalibrationCheck();
void setup();
float checkInternalVoltage();
float checkExternalVoltage();

View File

@@ -152,7 +152,7 @@ public:
WEBADMIN webadmin;
NTP ntp;
REMOTE_MANAGEMENT remoteManagement;
void init();
void writeFile();
Configuration();

View File

@@ -13,7 +13,6 @@ namespace LoRa_Utils {
void changeFreqTx();
void changeFreqRx();
void wakeRadio();
//void startReceive();
void sleepRadio();
}

View File

@@ -8,7 +8,7 @@ namespace TNC_Utils {
void setup();
void loop();
void sendToClients(const String& packet);
void sendToSerial(const String& packet);

View File

@@ -11,7 +11,7 @@ namespace WIFI_Utils {
void startWiFi();
void checkAutoAPTimeout();
void setup();
}
#endif

View File

@@ -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

View File

@@ -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";

View File

@@ -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;

View File

@@ -44,7 +44,7 @@
#endif
#endif
#endif
extern Configuration Config;
bool displayFound = false;

View File

@@ -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;
}

View File

@@ -199,7 +199,7 @@ namespace LoRa_Utils {
}
} else {
packet = "";
}
}
lastRxTime = millis();
return packet;
}

View File

@@ -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;
}
}

View File

@@ -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();

View File

@@ -113,7 +113,7 @@ namespace QUERY_Utils {
Config.writeFile();
}
}
if (answer == "") return "";
String queryAnswer = Config.callsign;

View File

@@ -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() {

View File

@@ -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> 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) {

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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

View File

@@ -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();

View File

@@ -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) {