LoRa_APRS_iGate/include/utils.h

53 lines
1.5 KiB
C
Raw Permalink Normal View History

2025-07-15 22:28:23 +02: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 20:18:30 +02:00
#ifndef UTILS_H_
#define UTILS_H_
#include <Arduino.h>
2024-11-06 16:47:42 +01:00
2024-04-13 18:20:10 +02:00
class ReceivedPacket {
public:
2024-10-14 16:44:22 +02:00
String rxTime;
2024-04-13 18:20:10 +02:00
String packet;
int RSSI;
2024-05-31 02:04:46 +02:00
float SNR;
2024-04-13 18:20:10 +02:00
};
2024-02-25 14:53:16 +01:00
2023-06-12 07:31:18 +02:00
namespace Utils {
2023-06-04 20:18:30 +02:00
2024-05-31 02:04:46 +02:00
void processStatus();
2024-06-08 20:12:20 +02:00
String getLocalIP();
2024-05-31 02:04:46 +02:00
void setupDisplay();
2025-10-11 23:27:06 +02:00
void showActiveStations();
2024-05-31 02:04:46 +02:00
void checkBeaconInterval();
void checkDisplayInterval();
void validateFreqs();
2024-06-06 05:49:16 +02:00
void typeOfPacket(const String& packet, const uint8_t packetType);
2024-05-31 02:04:46 +02:00
void print(const String& text);
void println(const String& text);
void checkRebootMode();
void checkRebootTime();
void checkSleepByLowBatteryVoltage(uint8_t mode);
2024-06-07 23:29:55 +02:00
bool checkValidCallsign(const String& callsign);
2025-10-12 19:21:51 +02:00
void startupDelay();
2023-06-04 20:18:30 +02:00
}
2023-06-06 16:43:04 +02:00
2023-06-04 20:18:30 +02:00
#endif