more const2
This commit is contained in:
parent
09908a19bc
commit
bfd4002fc9
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ namespace POWER_Utils {
|
|||
#endif
|
||||
}
|
||||
|
||||
String getBatteryInfoVoltage() {
|
||||
const String getBatteryInfoVoltage() {
|
||||
return batteryVoltage;
|
||||
}
|
||||
|
||||
String getBatteryInfoCurrent() {
|
||||
const String getBatteryInfoCurrent() {
|
||||
return batteryChargeDischargeCurrent;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
namespace POWER_Utils {
|
||||
|
||||
double getBatteryVoltage();
|
||||
String getBatteryInfoVoltage();
|
||||
String getBatteryInfoCurrent();
|
||||
const String getBatteryInfoVoltage();
|
||||
const String getBatteryInfoCurrent();
|
||||
bool getBatteryInfoIsConnected();
|
||||
|
||||
void enableChgLed();
|
||||
|
|
|
|||
|
|
@ -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(",")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue