more const2

This commit is contained in:
richonguzman 2024-06-05 23:38:26 -04:00
parent 09908a19bc
commit bfd4002fc9
10 changed files with 25 additions and 25 deletions

View File

@ -81,7 +81,7 @@ namespace AX25_Utils {
return frame;
}
std::string intToBinaryString(uint8_t value, uint8_t bitLength) {
std::string intToBinaryString(uint8_t value, const uint8_t bitLength) {
std::string result = "";
//result.reserve(bitLength);
for (int i = bitLength - 1; i >= 0; i--) {
@ -90,7 +90,7 @@ namespace AX25_Utils {
return result;
}
String encodeAX25Address(const String& frame, uint8_t type, bool lastAddress) {
String encodeAX25Address(const String& frame, uint8_t type, const bool lastAddress) {
String packet = "";
String address;
std::string concatenatedBinary;

View File

@ -39,8 +39,8 @@ namespace AX25_Utils {
bool decodeAX25(const String& frame, int frameSize, AX25Frame* decodedFrame);
String AX25FrameToLoRaPacket(const String& frame);
String frameCleaning(const String& frameToClean);
std::string intToBinaryString(uint8_t value, uint8_t bitLength);
String encodeAX25Address(const String& frame, uint8_t type, bool lastAddress);
std::string intToBinaryString(uint8_t value, const uint8_t bitLength);
String encodeAX25Address(const String& frame, uint8_t type, const bool lastAddress);
String LoRaPacketToAX25Frame(const String& packet);
}

View File

@ -49,7 +49,7 @@ uint8_t lowBatteryPercent = 21;
namespace MENU_Utils {
String checkBTType() {
const String checkBTType() {
switch (Config.bluetoothType) {
case 0:
return "BLE iPhone";
@ -62,7 +62,7 @@ namespace MENU_Utils {
}
}
String checkProcessActive(bool process) {
const String checkProcessActive(const bool process) {
if (process) {
return "ON";
} else {

View File

@ -5,10 +5,10 @@
namespace MENU_Utils {
String checkBTType();
String checkProcessActive(bool process);
const String checkBTType();
const String checkProcessActive(const bool process);
const String screenBrightnessAsString(const uint8_t bright);
void showOnScreen();
void showOnScreen();
}

View File

@ -68,7 +68,7 @@ namespace MSG_Utils {
return noWLNKMsgWarning;
}
String getLastHeardTracker() {
const String getLastHeardTracker() {
return lastHeardTracker;
}
@ -256,7 +256,7 @@ namespace MSG_Utils {
LoRa_Utils::sendNewPacket(newPacket);
}
String ackRequestNumberGenerator() {
const String ackRequestNumberGenerator() {
ackRequestNumber++;
if (ackRequestNumber > 999) {
ackRequestNumber = 1;

View File

@ -8,7 +8,7 @@ namespace MSG_Utils {
bool warnNoAPRSMessages();
bool warnNoWLNKMails();
String getLastHeardTracker();
const String getLastHeardTracker();
int getNumAPRSMessages();
int getNumWLNKMails();
void loadNumMessages();
@ -17,7 +17,7 @@ namespace MSG_Utils {
void deleteFile(uint8_t typeOfFile);
void saveNewMessage(uint8_t typeMessage, const String& station, const String& newMessage);
void sendMessage(const String& station, const String& textMessage);
String ackRequestNumberGenerator();
const String ackRequestNumberGenerator();
void addToOutputBuffer(uint8_t typeOfMessage, const String& station, const String& textMessage);
void processOutputBuffer();
void clean25SegBuffer();

View File

@ -86,11 +86,11 @@ namespace POWER_Utils {
#endif
}
String getBatteryInfoVoltage() {
const String getBatteryInfoVoltage() {
return batteryVoltage;
}
String getBatteryInfoCurrent() {
const String getBatteryInfoCurrent() {
return batteryChargeDischargeCurrent;
}

View File

@ -11,8 +11,8 @@
namespace POWER_Utils {
double getBatteryVoltage();
String getBatteryInfoVoltage();
String getBatteryInfoCurrent();
const String getBatteryInfoVoltage();
const String getBatteryInfoCurrent();
bool getBatteryInfoIsConnected();
void enableChgLed();

View File

@ -56,19 +56,19 @@ uint32_t lastDeleteListenedTracker;
namespace STATION_Utils {
String getFirstNearTracker() {
const String getFirstNearTracker() {
return String(firstNearTracker.substring(0, firstNearTracker.indexOf(",")));
}
String getSecondNearTracker() {
const String getSecondNearTracker() {
return String(secondNearTracker.substring(0, secondNearTracker.indexOf(",")));
}
String getThirdNearTracker() {
const String getThirdNearTracker() {
return String(thirdNearTracker.substring(0, thirdNearTracker.indexOf(",")));
}
String getFourthNearTracker() {
const String getFourthNearTracker() {
return String(fourthNearTracker.substring(0, fourthNearTracker.indexOf(",")));
}

View File

@ -5,10 +5,10 @@
namespace STATION_Utils {
String getFirstNearTracker();
String getSecondNearTracker();
String getThirdNearTracker();
String getFourthNearTracker();
const String getFirstNearTracker();
const String getSecondNearTracker();
const String getThirdNearTracker();
const String getFourthNearTracker();
void deleteListenedTrackersbyTime();
void checkListenedTrackersByTimeAndDelete();