diff --git a/src/bme_utils.cpp b/src/bme_utils.cpp index 2be6fb61..0bf7e9b1 100644 --- a/src/bme_utils.cpp +++ b/src/bme_utils.cpp @@ -116,7 +116,7 @@ namespace BME_Utils { } } - String generateTempString(float bmeTemp) { + const String generateTempString(const float bmeTemp) { String strTemp; strTemp = String((int)bmeTemp); switch (strTemp.length()) { @@ -131,7 +131,7 @@ namespace BME_Utils { } } - String generateHumString(float bmeHum) { + const String generateHumString(const float bmeHum) { String strHum; strHum = String((int)bmeHum); switch (strHum.length()) { @@ -150,7 +150,7 @@ namespace BME_Utils { } } - String generatePresString(float bmePress) { + const String generatePresString(const float bmePress) { String strPress = String((int)bmePress); String decPress = String(int((bmePress - int(bmePress)) * 10)); switch (strPress.length()) { @@ -169,7 +169,7 @@ namespace BME_Utils { } } - String readDataSensor() { + const String readDataSensor() { String wx, tempStr, humStr, presStr; switch (wxModuleType) { case 1: // BME280 diff --git a/src/bme_utils.h b/src/bme_utils.h index 7611ee6b..3a0dfde0 100644 --- a/src/bme_utils.h +++ b/src/bme_utils.h @@ -10,12 +10,12 @@ namespace BME_Utils { - void getWxModuleAddres(); - void setup(); - String generateTempString(float bmeTemp); - String generateHumString(float bmeHum); - String generatePresString(float bmePress); - String readDataSensor(); + void getWxModuleAddres(); + void setup(); + const String generateTempString(const float bmeTemp); + const String generateHumString(const float bmeHum); + const String generatePresString(const float bmePress); + const String readDataSensor(); } diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index 2cbc6506..00e0c8ba 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -134,7 +134,7 @@ namespace LoRa_Utils { } } - String packetSanitization(const String& packet) { + /*String packetSanitization(const String& packet) { String sanitizedPacket = packet; if (packet.indexOf("\0") > 0) { sanitizedPacket.replace("\0", ""); @@ -146,7 +146,7 @@ namespace LoRa_Utils { sanitizedPacket.replace("\n", ""); } return sanitizedPacket; - } + }*/ void startReceive() { radio.startReceive(); diff --git a/src/lora_utils.h b/src/lora_utils.h index f5d09e1d..14578f60 100644 --- a/src/lora_utils.h +++ b/src/lora_utils.h @@ -8,7 +8,7 @@ namespace LoRa_Utils { void setup(); void sendNewPacket(const String& newPacket); - String packetSanitization(const String& packet); + //String packetSanitization(const String& packet); String receivePacket(); void changeFreqTx(); void changeFreqRx(); diff --git a/src/query_utils.cpp b/src/query_utils.cpp index 349ab862..76557c56 100644 --- a/src/query_utils.cpp +++ b/src/query_utils.cpp @@ -12,7 +12,7 @@ extern int freqError; namespace QUERY_Utils { - String process(const String& query, const String& station, uint8_t queryOrigin) { + String process(const String& query, const String& station, const uint8_t queryOrigin) { String answer; if (query=="?APRS?" || query=="?aprs?" || query=="?Aprs?" || query=="H" || query=="h" || query=="HELP" || query=="Help" || query=="help" || query=="?") { answer = "?APRSV ?APRSP ?APRSL ?APRSH ?WHERE callsign"; diff --git a/src/query_utils.h b/src/query_utils.h index 136a3d57..1bab7413 100644 --- a/src/query_utils.h +++ b/src/query_utils.h @@ -6,7 +6,7 @@ namespace QUERY_Utils { - String process(const String& query, const String& station, uint8_t queryOrigin); + String process(const String& query, const String& station, const uint8_t queryOrigin); } diff --git a/src/syslog_utils.cpp b/src/syslog_utils.cpp index 45c93ada..5d49f3e2 100644 --- a/src/syslog_utils.cpp +++ b/src/syslog_utils.cpp @@ -11,7 +11,7 @@ WiFiUDP udpClient; namespace SYSLOG_Utils { - void log(uint8_t type, const String& packet, int rssi, float snr, int freqError) { + void log(const uint8_t type, const String& packet, const int rssi, const float snr, const int freqError) { if (Config.syslog.active && WiFi.status() == WL_CONNECTED) { String syslogPacket = "<165>1 - "; syslogPacket.concat(Config.callsign); diff --git a/src/syslog_utils.h b/src/syslog_utils.h index a60d0a24..85e50cc2 100644 --- a/src/syslog_utils.h +++ b/src/syslog_utils.h @@ -6,7 +6,7 @@ namespace SYSLOG_Utils { - void log(uint8_t type ,const String& packet, int rssi, float snr, int freqError); + void log(const uint8_t type ,const String& packet, const int rssi, const float snr, const int freqError); void setup(); } diff --git a/src/utils.cpp b/src/utils.cpp index 2b146d97..96abd6dc 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -66,7 +66,7 @@ namespace Utils { } } - String getLocalIP() { + const String getLocalIP() { if (!WiFiConnected) { return "IP : 192.168.4.1"; } else if (backUpDigiMode) { @@ -213,7 +213,7 @@ namespace Utils { } } - void typeOfPacket(const String& packet, uint8_t packetType) { + void typeOfPacket(const String& packet, const uint8_t packetType) { String sender = packet.substring(0,packet.indexOf(">")); switch (packetType) { case 0: // LoRa-APRS diff --git a/src/utils.h b/src/utils.h index d7300406..e1d97140 100644 --- a/src/utils.h +++ b/src/utils.h @@ -14,13 +14,13 @@ class ReceivedPacket { namespace Utils { void processStatus(); - String getLocalIP(); + const String getLocalIP(); void setupDisplay(); void activeStations(); void checkBeaconInterval(); void checkDisplayInterval(); void validateFreqs(); - void typeOfPacket(const String& packet, uint8_t packetType); + void typeOfPacket(const String& packet, const uint8_t packetType); void print(const String& text); void println(const String& text); void checkRebootMode();