2025-07-15 16:28:23 -04:00
|
|
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
|
|
|
|
*
|
|
|
|
|
* This file is part of LoRa APRS iGate.
|
|
|
|
|
*
|
|
|
|
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2023-06-04 14:18:30 -04:00
|
|
|
#ifndef UTILS_H_
|
|
|
|
|
#define UTILS_H_
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
2024-11-06 12:47:42 -03:00
|
|
|
|
2024-04-13 18:20:10 +02:00
|
|
|
class ReceivedPacket {
|
|
|
|
|
public:
|
2024-10-14 11:44:22 -03:00
|
|
|
String rxTime;
|
2024-04-13 18:20:10 +02:00
|
|
|
String packet;
|
|
|
|
|
int RSSI;
|
2024-05-30 20:04:46 -04:00
|
|
|
float SNR;
|
2024-04-13 18:20:10 +02:00
|
|
|
};
|
2024-02-25 10:53:16 -03:00
|
|
|
|
2023-06-12 01:31:18 -04:00
|
|
|
namespace Utils {
|
2023-06-04 14:18:30 -04:00
|
|
|
|
2024-05-30 20:04:46 -04:00
|
|
|
void processStatus();
|
2024-06-08 14:12:20 -04:00
|
|
|
String getLocalIP();
|
2024-05-30 20:04:46 -04:00
|
|
|
void setupDisplay();
|
2025-10-11 18:27:06 -03:00
|
|
|
void showActiveStations();
|
2024-05-30 20:04:46 -04:00
|
|
|
void checkBeaconInterval();
|
|
|
|
|
void checkDisplayInterval();
|
|
|
|
|
void validateFreqs();
|
2024-06-05 23:49:16 -04:00
|
|
|
void typeOfPacket(const String& packet, const uint8_t packetType);
|
2024-05-30 20:04:46 -04:00
|
|
|
void print(const String& text);
|
|
|
|
|
void println(const String& text);
|
|
|
|
|
void checkRebootMode();
|
|
|
|
|
void checkRebootTime();
|
|
|
|
|
void checkSleepByLowBatteryVoltage(uint8_t mode);
|
2024-06-07 17:29:55 -04:00
|
|
|
bool checkValidCallsign(const String& callsign);
|
2025-10-12 14:21:51 -03:00
|
|
|
void startupDelay();
|
2023-06-04 14:18:30 -04:00
|
|
|
|
|
|
|
|
}
|
2023-06-06 10:43:04 -04:00
|
|
|
|
2023-06-04 14:18:30 -04:00
|
|
|
#endif
|