code cleaning start
This commit is contained in:
parent
ac2894f88c
commit
95a8796a80
|
|
@ -45,7 +45,7 @@ TinyGPSPlus gps;
|
|||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.05.21";
|
||||
String versionDate = "2024.05.30";
|
||||
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
|
|
|
|||
|
|
@ -14,34 +14,34 @@ struct AX25Frame { // Define AX.25 frame structure
|
|||
};
|
||||
|
||||
enum KissChar {
|
||||
Fend = 0xc0,
|
||||
Fesc = 0xdb,
|
||||
Tfend = 0xdc,
|
||||
Tfesc = 0xdd
|
||||
Fend = 0xc0,
|
||||
Fesc = 0xdb,
|
||||
Tfend = 0xdc,
|
||||
Tfesc = 0xdd
|
||||
};
|
||||
|
||||
enum KissCmd {
|
||||
Data = 0x00,
|
||||
TxDelay = 0x01,
|
||||
P = 0x02,
|
||||
SlotTime = 0x03,
|
||||
TxTail = 0x04,
|
||||
SetHardware = 0x06,
|
||||
SignalReport = 0x07,
|
||||
RebootRequested = 0x08,
|
||||
Telemetry = 0x09,
|
||||
NoCmd = 0x80
|
||||
Data = 0x00,
|
||||
TxDelay = 0x01,
|
||||
P = 0x02,
|
||||
SlotTime = 0x03,
|
||||
TxTail = 0x04,
|
||||
SetHardware = 0x06,
|
||||
SignalReport = 0x07,
|
||||
RebootRequested = 0x08,
|
||||
Telemetry = 0x09,
|
||||
NoCmd = 0x80
|
||||
};
|
||||
|
||||
namespace AX25_Utils {
|
||||
|
||||
String decodeFrame(const String& frame);
|
||||
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);
|
||||
String LoRaPacketToAX25Frame(const String& packet);
|
||||
String decodeFrame(const String& frame);
|
||||
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);
|
||||
String LoRaPacketToAX25Frame(const String& packet);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
|
||||
namespace BME_Utils {
|
||||
|
||||
void getWxModuleAddres();
|
||||
void setup();
|
||||
String generateTempString(float bmeTemp, uint8_t type);
|
||||
String generateHumString(float bmeHum, uint8_t type);
|
||||
String generatePresString(float bmePress, uint8_t type);
|
||||
String readDataSensor(uint8_t type);
|
||||
void getWxModuleAddres();
|
||||
void setup();
|
||||
String generateTempString(float bmeTemp, uint8_t type);
|
||||
String generateHumString(float bmeHum, uint8_t type);
|
||||
String generatePresString(float bmePress, uint8_t type);
|
||||
String readDataSensor(uint8_t type);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
namespace MENU_Utils {
|
||||
|
||||
String checkBTType();
|
||||
String checkProcessActive(bool process);
|
||||
String checkScreenBrightness(uint8_t bright);
|
||||
void showOnScreen();
|
||||
String checkBTType();
|
||||
String checkProcessActive(bool process);
|
||||
String checkScreenBrightness(uint8_t bright);
|
||||
void showOnScreen();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,36 +10,36 @@
|
|||
|
||||
namespace POWER_Utils {
|
||||
|
||||
double getBatteryVoltage();
|
||||
String getBatteryInfoVoltage();
|
||||
String getBatteryInfoCurrent();
|
||||
bool getBatteryInfoIsConnected();
|
||||
double getBatteryVoltage();
|
||||
String getBatteryInfoVoltage();
|
||||
String getBatteryInfoCurrent();
|
||||
bool getBatteryInfoIsConnected();
|
||||
|
||||
void enableChgLed();
|
||||
void disableChgLed();
|
||||
void enableChgLed();
|
||||
void disableChgLed();
|
||||
|
||||
bool isCharging();
|
||||
void handleChargingLed();
|
||||
double getBatteryChargeDischargeCurrent();
|
||||
bool isBatteryConnected();
|
||||
void obtainBatteryInfo();
|
||||
void batteryManager();
|
||||
bool isCharging();
|
||||
void handleChargingLed();
|
||||
double getBatteryChargeDischargeCurrent();
|
||||
bool isBatteryConnected();
|
||||
void obtainBatteryInfo();
|
||||
void batteryManager();
|
||||
|
||||
void activateMeasurement();
|
||||
void activateMeasurement();
|
||||
|
||||
void activateGPS();
|
||||
void deactivateGPS();
|
||||
void activateGPS();
|
||||
void deactivateGPS();
|
||||
|
||||
void activateLoRa();
|
||||
void deactivateLoRa();
|
||||
void activateLoRa();
|
||||
void deactivateLoRa();
|
||||
|
||||
void externalPinSetup();
|
||||
void externalPinSetup();
|
||||
|
||||
bool begin(TwoWire &port);
|
||||
void setup();
|
||||
bool begin(TwoWire &port);
|
||||
void setup();
|
||||
|
||||
void lowerCpuFrequency();
|
||||
void shutdown();
|
||||
void lowerCpuFrequency();
|
||||
void shutdown();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@
|
|||
|
||||
namespace STATION_Utils {
|
||||
|
||||
String getFirstNearTracker();
|
||||
String getSecondNearTracker();
|
||||
String getThirdNearTracker();
|
||||
String getFourthNearTracker();
|
||||
String getFirstNearTracker();
|
||||
String getSecondNearTracker();
|
||||
String getThirdNearTracker();
|
||||
String getFourthNearTracker();
|
||||
|
||||
void deleteListenedTrackersbyTime();
|
||||
void checkListenedTrackersByTimeAndDelete();
|
||||
void orderListenedTrackersByDistance(const String& callsign, float distance, float course);
|
||||
void checkSmartBeaconInterval(int speed);
|
||||
void checkStandingUpdateTime();
|
||||
void checkSmartBeaconValue();
|
||||
void checkSmartBeaconState();
|
||||
void sendBeacon(uint8_t type);
|
||||
void checkTelemetryTx();
|
||||
void saveIndex(uint8_t type, uint8_t index);
|
||||
void loadIndex(uint8_t type);
|
||||
void deleteListenedTrackersbyTime();
|
||||
void checkListenedTrackersByTimeAndDelete();
|
||||
void orderListenedTrackersByDistance(const String& callsign, float distance, float course);
|
||||
void checkSmartBeaconInterval(int speed);
|
||||
void checkStandingUpdateTime();
|
||||
void checkSmartBeaconValue();
|
||||
void checkSmartBeaconState();
|
||||
void sendBeacon(uint8_t type);
|
||||
void checkTelemetryTx();
|
||||
void saveIndex(uint8_t type, uint8_t index);
|
||||
void loadIndex(uint8_t type);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
14
src/utils.h
14
src/utils.h
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
namespace Utils {
|
||||
|
||||
char *getMaidenheadLocator(double lat, double lon, uint8_t size);
|
||||
String createDateString(time_t t);
|
||||
String createTimeString(time_t t);
|
||||
void checkStatus();
|
||||
void checkDisplayEcoMode();
|
||||
String getSmartBeaconState();
|
||||
void checkFlashlight();
|
||||
char *getMaidenheadLocator(double lat, double lon, uint8_t size);
|
||||
String createDateString(time_t t);
|
||||
String createTimeString(time_t t);
|
||||
void checkStatus();
|
||||
void checkDisplayEcoMode();
|
||||
String getSmartBeaconState();
|
||||
void checkFlashlight();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue