kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
change beacon config
rodzic
894bbb9edc
commit
7861ab215f
|
@ -30,7 +30,8 @@
|
|||
"longitude": 0.000000
|
||||
},
|
||||
"use_gps": false,
|
||||
"timeout": 15
|
||||
"timeout": 15,
|
||||
"send_on_hf": false
|
||||
},
|
||||
"aprs_is": {
|
||||
"active": true,
|
||||
|
@ -40,8 +41,7 @@
|
|||
"filter": ""
|
||||
},
|
||||
"digi": {
|
||||
"active": false,
|
||||
"beacon": false
|
||||
"active": false
|
||||
},
|
||||
"lora": {
|
||||
"frequency_rx": 433775000,
|
||||
|
|
|
@ -116,7 +116,7 @@ bool BeaconTask::sendBeacon(System &system) {
|
|||
_toAprsIs.addElement(_beaconMsg);
|
||||
}
|
||||
|
||||
if (system.getUserConfig()->digi.beacon) {
|
||||
if (system.getUserConfig()->beacon.send_on_hf) {
|
||||
_toModem.addElement(_beaconMsg);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,9 @@ void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocumen
|
|||
conf.beacon.positionLongitude = data["beacon"]["position"]["longitude"] | 0.0;
|
||||
conf.beacon.use_gps = data["beacon"]["use_gps"] | false;
|
||||
conf.beacon.timeout = data["beacon"]["timeout"] | 15;
|
||||
conf.aprs_is.active = data["aprs_is"]["active"] | true;
|
||||
conf.beacon.send_on_hf = data["beacon"]["send_on_hf"] | false;
|
||||
|
||||
conf.aprs_is.active = data["aprs_is"]["active"] | true;
|
||||
if (data.containsKey("aprs_is") && data["aprs_is"].containsKey("passcode"))
|
||||
conf.aprs_is.passcode = data["aprs_is"]["passcode"].as<String>();
|
||||
if (data.containsKey("aprs_is") && data["aprs_is"].containsKey("server"))
|
||||
|
@ -56,7 +57,6 @@ void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocumen
|
|||
conf.aprs_is.filter = data["aprs_is"]["filter"].as<String>();
|
||||
|
||||
conf.digi.active = data["digi"]["active"] | false;
|
||||
conf.digi.beacon = data["digi"]["beacon"] | false;
|
||||
|
||||
conf.lora.frequencyRx = data["lora"]["frequency_rx"] | 433775000;
|
||||
conf.lora.gainRx = data["lora"]["gain_rx"] | 0;
|
||||
|
@ -145,13 +145,13 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co
|
|||
data["beacon"]["position"]["longitude"] = conf.beacon.positionLongitude;
|
||||
data["beacon"]["use_gps"] = conf.beacon.use_gps;
|
||||
data["beacon"]["timeout"] = conf.beacon.timeout;
|
||||
data["beacon"]["send_on_hf"] = conf.beacon.send_on_hf;
|
||||
data["aprs_is"]["active"] = conf.aprs_is.active;
|
||||
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["aprs_is"]["filter"] = conf.aprs_is.filter;
|
||||
data["digi"]["active"] = conf.digi.active;
|
||||
data["digi"]["beacon"] = conf.digi.beacon;
|
||||
data["lora"]["frequency_rx"] = conf.lora.frequencyRx;
|
||||
data["lora"]["gain_rx"] = conf.lora.gainRx;
|
||||
data["lora"]["frequency_tx"] = conf.lora.frequencyTx;
|
||||
|
|
|
@ -17,6 +17,9 @@ public:
|
|||
|
||||
class Hostname {
|
||||
public:
|
||||
Hostname() : overwrite(false) {
|
||||
}
|
||||
|
||||
bool overwrite;
|
||||
String name;
|
||||
};
|
||||
|
@ -48,7 +51,7 @@ public:
|
|||
|
||||
class Beacon {
|
||||
public:
|
||||
Beacon() : message("LoRa iGATE & Digi, Info: github.com/peterus/LoRa_APRS_iGate"), positionLatitude(0.0), positionLongitude(0.0), use_gps(false), timeout(15) {
|
||||
Beacon() : message("LoRa iGATE & Digi, Info: github.com/peterus/LoRa_APRS_iGate"), positionLatitude(0.0), positionLongitude(0.0), use_gps(false), timeout(15), send_on_hf(false) {
|
||||
}
|
||||
|
||||
String message;
|
||||
|
@ -56,6 +59,7 @@ public:
|
|||
double positionLongitude;
|
||||
bool use_gps;
|
||||
int timeout;
|
||||
bool send_on_hf;
|
||||
};
|
||||
|
||||
class APRS_IS {
|
||||
|
@ -72,16 +76,15 @@ public:
|
|||
|
||||
class Digi {
|
||||
public:
|
||||
Digi() : active(false), beacon(true) {
|
||||
Digi() : active(false) {
|
||||
}
|
||||
|
||||
bool active;
|
||||
bool beacon;
|
||||
};
|
||||
|
||||
class LoRa {
|
||||
public:
|
||||
LoRa() : frequencyRx(433775000), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5), tx_enable(true) {
|
||||
LoRa() : frequencyRx(433775000), gainRx(0), frequencyTx(433775000), power(20), spreadingFactor(12), signalBandwidth(125000), codingRate4(5), tx_enable(true) {
|
||||
}
|
||||
|
||||
long frequencyRx;
|
||||
|
|
Ładowanie…
Reference in New Issue