mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-07 22:13:53 +01:00
87 lines
1.5 KiB
C++
87 lines
1.5 KiB
C++
#ifndef CONFIGURATION_H_
|
|
#define CONFIGURATION_H_
|
|
|
|
#include <Arduino.h>
|
|
#include <vector>
|
|
#include <FS.h>
|
|
|
|
class WiFi_AP {
|
|
public:
|
|
String ssid;
|
|
String password;
|
|
double latitude;
|
|
double longitude;
|
|
};
|
|
|
|
class DIGI {
|
|
public:
|
|
String comment;
|
|
double latitude;
|
|
double longitude;
|
|
};
|
|
|
|
class APRS_IS {
|
|
public:
|
|
String passcode;
|
|
String server;
|
|
int port;
|
|
int reportingDistance;
|
|
};
|
|
|
|
class LoraModule {
|
|
public:
|
|
long iGateFreq;
|
|
long digirepeaterTxFreq;
|
|
long digirepeaterRxFreq;
|
|
int spreadingFactor;
|
|
long signalBandwidth;
|
|
int codingRate4;
|
|
int power;
|
|
};
|
|
|
|
class Display {
|
|
public:
|
|
bool alwaysOn;
|
|
int timeout;
|
|
bool turn180;
|
|
};
|
|
|
|
class SYSLOG {
|
|
public:
|
|
bool active;
|
|
String server;
|
|
int port;
|
|
};
|
|
|
|
class BME {
|
|
public:
|
|
bool active;
|
|
};
|
|
|
|
class Configuration {
|
|
public:
|
|
|
|
String callsign;
|
|
int stationMode;
|
|
String iGateComment;
|
|
int beaconInterval;
|
|
int rememberStationTime;
|
|
bool sendBatteryVoltage;
|
|
int lastWiFiCheck;
|
|
std::vector<WiFi_AP> wifiAPs;
|
|
DIGI digi;
|
|
APRS_IS aprs_is;
|
|
LoraModule loramodule;
|
|
Display display;
|
|
SYSLOG syslog;
|
|
BME bme;
|
|
|
|
|
|
Configuration();
|
|
void validateConfigFile(String currentBeaconCallsign);
|
|
|
|
private:
|
|
void readFile(fs::FS &fs, const char *fileName) ;
|
|
String _filePath;
|
|
};
|
|
#endif |