kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
rodzic
945a51ad5a
commit
d6083df174
|
@ -21,6 +21,11 @@
|
|||
"server": "euro.aprs2.net",
|
||||
"port": 14580
|
||||
},
|
||||
"digi": {
|
||||
"active": false,
|
||||
"forward_timeout": 5,
|
||||
"beacon": true,
|
||||
},
|
||||
"lora": {
|
||||
"frequency_rx": 433775000,
|
||||
"frequency_tx": 433775000,
|
||||
|
|
|
@ -26,6 +26,9 @@ void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocumen
|
|||
conf.aprs_is.server = data["aprs_is"]["server"].as<String>();
|
||||
conf.aprs_is.port = data["aprs_is"]["port"] | 14580;
|
||||
|
||||
conf.digi.active = data["digi"]["active"] | false;
|
||||
conf.digi.forwardTimeout = data["digi"]["forward_timeout"] | 5;
|
||||
conf.digi.beacon = data["digi"]["beacon"] | true;
|
||||
conf.lora.frequencyRx = data["lora"]["frequency_rx"] | 433775000;
|
||||
conf.lora.frequencyTx = data["lora"]["frequency_tx"] | 433775000;
|
||||
conf.lora.power = data["lora"]["power"] | 20;
|
||||
|
@ -73,6 +76,9 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co
|
|||
data["aprs_is"]["passcode"] = conf.aprs_is.passcode;
|
||||
data["aprs_is"]["server"] = conf.aprs_is.server;
|
||||
data["aprs_is"]["port"] = conf.aprs_is.port;
|
||||
data["digi"]["active"] = conf.digi.active;
|
||||
data["digi"]["forward_timeout"] = conf.digi.forwardTimeout;
|
||||
data["digi"]["beacon"] = conf.digi.beacon;
|
||||
data["lora"]["frequency_rx"] = conf.lora.frequencyRx;
|
||||
data["lora"]["frequency_tx"] = conf.lora.frequencyTx;
|
||||
data["lora"]["power"] = conf.lora.power;
|
||||
|
|
|
@ -41,6 +41,16 @@ public:
|
|||
int port;
|
||||
};
|
||||
|
||||
class Digi {
|
||||
public:
|
||||
Digi() : active(false), forwardTimeout(5), beacon(true) {
|
||||
}
|
||||
|
||||
bool active;
|
||||
int forwardTimeout;
|
||||
bool beacon;
|
||||
};
|
||||
|
||||
class LoRa {
|
||||
public:
|
||||
LoRa() : frequencyRx(433775000), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5) {
|
||||
|
@ -86,6 +96,7 @@ public:
|
|||
Wifi wifi;
|
||||
Beacon beacon;
|
||||
APRS_IS aprs_is;
|
||||
Digi digi;
|
||||
LoRa lora;
|
||||
Display display;
|
||||
Ftp ftp;
|
||||
|
|
Ładowanie…
Reference in New Issue