mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-01-28 03:14:28 +01:00
ready for testing
This commit is contained in:
parent
1840ce2338
commit
b65a6de018
|
|
@ -22,13 +22,15 @@
|
|||
},
|
||||
"aprs_is": {
|
||||
"active": false,
|
||||
"passcode": "XYZVW",
|
||||
"server": "rotate.aprs2.net",
|
||||
"port": 14580,
|
||||
"filter": "m/10",
|
||||
"messagesToRF": false,
|
||||
"objectsToRF": false
|
||||
"objectsToRF": false,
|
||||
"server": "rotate.aprs2.net",
|
||||
"passcode": "XYZVW",
|
||||
"port": 14580,
|
||||
"filter": "m/10"
|
||||
},
|
||||
"personalNote": "",
|
||||
"blacklist": "",
|
||||
"digi": {
|
||||
"mode": 0,
|
||||
"ecoMode": 0
|
||||
|
|
@ -76,6 +78,14 @@
|
|||
"enableSerial": false,
|
||||
"acceptOwn": false
|
||||
},
|
||||
"mqtt": {
|
||||
"active": false,
|
||||
"server": "",
|
||||
"topic": "",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"port": 1883
|
||||
},
|
||||
"ota": {
|
||||
"username": "",
|
||||
"password": ""
|
||||
|
|
@ -84,27 +94,17 @@
|
|||
"username": "admin",
|
||||
"password": ""
|
||||
},
|
||||
"ntp": {
|
||||
"gmtCorrection": 0.0
|
||||
},
|
||||
"remoteManagement": {
|
||||
"managers": "",
|
||||
"rfOnly": true
|
||||
},
|
||||
"mqtt": {
|
||||
"active": false,
|
||||
"server": "",
|
||||
"topic": "",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"port": 1883
|
||||
},
|
||||
},
|
||||
"ntp": {
|
||||
"gmtCorrection": 0.0
|
||||
},
|
||||
"other": {
|
||||
"rememberStationTime": 30,
|
||||
"backupDigiMode": false,
|
||||
"rebootMode": false,
|
||||
"rebootModeTime": 6
|
||||
},
|
||||
"personalNote": "",
|
||||
"blacklist": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -283,6 +283,7 @@
|
|||
id="beacon.statusPacket"
|
||||
class="form-control"
|
||||
placeholder="Custom Status"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -403,7 +404,6 @@
|
|||
name="aprs_is.messagesToRF"
|
||||
id="aprs_is.messagesToRF"
|
||||
class="form-check-input"
|
||||
disabled
|
||||
/>
|
||||
<label
|
||||
for="aprs_is.messagesToRF"
|
||||
|
|
@ -420,7 +420,6 @@
|
|||
name="aprs_is.objectsToRF"
|
||||
id="aprs_is.objectsToRF"
|
||||
class="form-check-input"
|
||||
disabled
|
||||
/>
|
||||
<label
|
||||
for="aprs_is.objectsToRF"
|
||||
|
|
@ -440,9 +439,9 @@
|
|||
type="text"
|
||||
name="aprs_is.server"
|
||||
id="aprs_is.server"
|
||||
placeholder="soam.aprs2.net"
|
||||
placeholder="rotate.aprs2.net"
|
||||
class="form-control"
|
||||
disabled
|
||||
value="rotate.aprs2.net"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
|
|
@ -457,7 +456,7 @@
|
|||
id="aprs_is.port"
|
||||
placeholder="14580"
|
||||
class="form-control"
|
||||
disabled
|
||||
value="14580"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -473,7 +472,7 @@
|
|||
name="aprs_is.passcode"
|
||||
id="aprs_is.passcode"
|
||||
class="form-control"
|
||||
disabled
|
||||
value="XYZWV"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
|
|
@ -487,7 +486,7 @@
|
|||
class="form-control"
|
||||
name="aprs_is.filter"
|
||||
id="aprs_is.filter"
|
||||
disabled
|
||||
value="m/10"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1027,7 +1026,6 @@
|
|||
step="1"
|
||||
min="2"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>seconds</span
|
||||
|
|
@ -1148,7 +1146,6 @@
|
|||
step="0.1"
|
||||
min="2.9"
|
||||
max="3.7"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>volts</span
|
||||
|
|
@ -1197,7 +1194,6 @@
|
|||
step="0.1"
|
||||
min="3.0"
|
||||
max="24.0"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>volts</span
|
||||
|
|
@ -1310,7 +1306,6 @@
|
|||
class="form-control"
|
||||
step="1"
|
||||
min="0"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>meters</span
|
||||
|
|
@ -1331,7 +1326,6 @@
|
|||
step="0.1"
|
||||
min="-5"
|
||||
max="5"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>C°</span
|
||||
|
|
@ -1392,7 +1386,6 @@
|
|||
id="syslog.server"
|
||||
placeholder="lora.link9.net"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
|
@ -1407,7 +1400,6 @@
|
|||
id="syslog.port"
|
||||
placeholder="1514"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
|
@ -1572,7 +1564,6 @@
|
|||
name="mqtt.server"
|
||||
id="mqtt.server"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1589,7 +1580,6 @@
|
|||
id="mqtt.topic"
|
||||
class="form-control"
|
||||
placeholder="aprs-igate"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
|
|
@ -1608,7 +1598,6 @@
|
|||
name="mqtt.username"
|
||||
id="mqtt.username"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1624,7 +1613,6 @@
|
|||
name="mqtt.password"
|
||||
id="mqtt.password"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1644,7 +1632,6 @@
|
|||
required=""
|
||||
step="1"
|
||||
min="0"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div class="form-text">
|
||||
|
|
@ -1712,7 +1699,6 @@
|
|||
step="6"
|
||||
min="6"
|
||||
max="168"
|
||||
disabled
|
||||
/>
|
||||
<span class="input-group-text"
|
||||
>hours</span
|
||||
|
|
@ -1902,7 +1888,6 @@
|
|||
class="form-control"
|
||||
value="admin"
|
||||
required=""
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
|
|
@ -1914,7 +1899,6 @@
|
|||
name="webadmin.password"
|
||||
id="webadmin.password"
|
||||
class="form-control"
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ void Configuration::writeFile() {
|
|||
data["beacon"]["gpsActive"] = beacon.gpsActive;
|
||||
data["beacon"]["gpsAmbiguity"] = beacon.gpsAmbiguity;
|
||||
|
||||
data["personalNote"] = personalNote;
|
||||
|
||||
data["blacklist"] = blacklist;
|
||||
|
||||
data["digi"]["mode"] = digi.mode;
|
||||
data["digi"]["ecoMode"] = digi.ecoMode;
|
||||
#if defined(HAS_A7670)
|
||||
|
|
@ -113,29 +117,6 @@ void Configuration::writeFile() {
|
|||
data["tnc"]["enableSerial"] = tnc.enableSerial;
|
||||
data["tnc"]["acceptOwn"] = tnc.acceptOwn;
|
||||
|
||||
data["other"]["rebootMode"] = rebootMode;
|
||||
data["other"]["rebootModeTime"] = rebootModeTime;
|
||||
|
||||
data["ota"]["username"] = ota.username;
|
||||
data["ota"]["password"] = ota.password;
|
||||
|
||||
data["other"]["rememberStationTime"] = rememberStationTime;
|
||||
|
||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
||||
|
||||
data["personalNote"] = personalNote;
|
||||
|
||||
data["blacklist"] = blacklist;
|
||||
|
||||
data["webadmin"]["active"] = webadmin.active;
|
||||
data["webadmin"]["username"] = webadmin.username;
|
||||
data["webadmin"]["password"] = webadmin.password;
|
||||
|
||||
data["ntp"]["gmtCorrection"] = ntp.gmtCorrection;
|
||||
|
||||
data["remoteManagement"]["managers"] = remoteManagement.managers;
|
||||
data["remoteManagement"]["rfOnly"] = remoteManagement.rfOnly;
|
||||
|
||||
data["mqtt"]["active"] = mqtt.active;
|
||||
data["mqtt"]["server"] = mqtt.server;
|
||||
data["mqtt"]["topic"] = mqtt.topic;
|
||||
|
|
@ -143,6 +124,25 @@ void Configuration::writeFile() {
|
|||
data["mqtt"]["password"] = mqtt.password;
|
||||
data["mqtt"]["port"] = mqtt.port;
|
||||
|
||||
data["ota"]["username"] = ota.username;
|
||||
data["ota"]["password"] = ota.password;
|
||||
|
||||
data["webadmin"]["active"] = webadmin.active;
|
||||
data["webadmin"]["username"] = webadmin.username;
|
||||
data["webadmin"]["password"] = webadmin.password;
|
||||
|
||||
data["remoteManagement"]["managers"] = remoteManagement.managers;
|
||||
data["remoteManagement"]["rfOnly"] = remoteManagement.rfOnly;
|
||||
|
||||
data["ntp"]["gmtCorrection"] = ntp.gmtCorrection;
|
||||
|
||||
data["other"]["rebootMode"] = rebootMode;
|
||||
data["other"]["rebootModeTime"] = rebootModeTime;
|
||||
|
||||
data["other"]["rememberStationTime"] = rememberStationTime;
|
||||
|
||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
||||
|
||||
serializeJson(data, configFile);
|
||||
|
||||
configFile.close();
|
||||
|
|
@ -177,7 +177,16 @@ bool Configuration::readFile() {
|
|||
wifiAutoAP.timeout = data["wifi"]["autoAP"]["timeout"] | 10;
|
||||
|
||||
callsign = data["callsign"] | "NOCALL-10";
|
||||
rememberStationTime = data["other"]["rememberStationTime"] | 30;
|
||||
|
||||
|
||||
aprs_is.active = data["aprs_is"]["active"] | false;
|
||||
aprs_is.passcode = data["aprs_is"]["passcode"] | "XYZWV";
|
||||
aprs_is.server = data["aprs_is"]["server"] | "rotate.aprs2.net";
|
||||
aprs_is.port = data["aprs_is"]["port"] | 14580;
|
||||
aprs_is.filter = data["aprs_is"]["filter"] | "m/10";
|
||||
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"] | false;
|
||||
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"] | false;
|
||||
|
||||
|
||||
beacon.latitude = data["beacon"]["latitude"] | 0.0;
|
||||
beacon.longitude = data["beacon"]["longitude"] | 0.0;
|
||||
|
|
@ -188,20 +197,16 @@ bool Configuration::readFile() {
|
|||
beacon.path = data["beacon"]["path"] | "WIDE1-1";
|
||||
beacon.sendViaAPRSIS = data["beacon"]["sendViaAPRSIS"] | false;
|
||||
beacon.sendViaRF = data["beacon"]["sendViaRF"] | false;
|
||||
|
||||
|
||||
beacon.statusActive = data["beacon"]["statusActive"] | false;
|
||||
beacon.statusPacket = data["beacon"]["statusPacket"] | "";
|
||||
|
||||
beacon.gpsActive = data["beacon"]["gpsActive"] | false;
|
||||
beacon.gpsAmbiguity = data["beacon"]["gpsAmbiguity"] | false;
|
||||
|
||||
aprs_is.active = data["aprs_is"]["active"] | false;
|
||||
aprs_is.passcode = data["aprs_is"]["passcode"] | "XYZWV";
|
||||
aprs_is.server = data["aprs_is"]["server"] | "rotate.aprs2.net";
|
||||
aprs_is.port = data["aprs_is"]["port"] | 14580;
|
||||
aprs_is.filter = data["aprs_is"]["filter"] | "m/10";
|
||||
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"] | false;
|
||||
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"] | false;
|
||||
personalNote = data["personalNote"] | "personal note here";
|
||||
|
||||
blacklist = data["blacklist"] | "station callsign";
|
||||
|
||||
digi.mode = data["digi"]["mode"] | 0;
|
||||
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
||||
|
|
@ -245,38 +250,36 @@ bool Configuration::readFile() {
|
|||
syslog.server = data["syslog"]["server"] | "lora.link9.net";
|
||||
syslog.port = data["syslog"]["port"] | 1514;
|
||||
syslog.logBeaconOverTCPIP = data["syslog"]["logBeaconOverTCPIP"] | false;
|
||||
|
||||
|
||||
tnc.enableServer = data["tnc"]["enableServer"] | false;
|
||||
tnc.enableSerial = data["tnc"]["enableSerial"] | false;
|
||||
tnc.acceptOwn = data["tnc"]["acceptOwn"] | false;
|
||||
|
||||
ota.username = data["ota"]["username"] | "";
|
||||
ota.password = data["ota"]["password"] | "";
|
||||
|
||||
webadmin.active = data["webadmin"]["active"] | false;
|
||||
webadmin.username = data["webadmin"]["username"] | "admin";
|
||||
webadmin.password = data["webadmin"]["password"] | "";
|
||||
|
||||
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0.0;
|
||||
|
||||
backupDigiMode = data["other"]["backupDigiMode"] | false;
|
||||
|
||||
rebootMode = data["other"]["rebootMode"] | false;
|
||||
rebootModeTime = data["other"]["rebootModeTime"] | 6;
|
||||
|
||||
personalNote = data["personalNote"] | "personal note here";
|
||||
|
||||
blacklist = data["blacklist"] | "station callsign";
|
||||
|
||||
remoteManagement.managers = data["remoteManagement"]["managers"] | "";
|
||||
remoteManagement.rfOnly = data["remoteManagement"]["rfOnly"] | true;
|
||||
|
||||
mqtt.active = data["mqtt"]["active"] | false;
|
||||
mqtt.server = data["mqtt"]["server"] | "";
|
||||
mqtt.topic = data["mqtt"]["topic"] | "aprs-igate";
|
||||
mqtt.username = data["mqtt"]["username"] | "";
|
||||
mqtt.password = data["mqtt"]["password"] | "";
|
||||
mqtt.port = data["mqtt"]["port"] | 1883;
|
||||
|
||||
ota.username = data["ota"]["username"] | "";
|
||||
ota.password = data["ota"]["password"] | "";
|
||||
|
||||
webadmin.active = data["webadmin"]["active"] | false;
|
||||
webadmin.username = data["webadmin"]["username"] | "admin";
|
||||
webadmin.password = data["webadmin"]["password"] | "";
|
||||
|
||||
remoteManagement.managers = data["remoteManagement"]["managers"] | "";
|
||||
remoteManagement.rfOnly = data["remoteManagement"]["rfOnly"] | true;
|
||||
|
||||
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0.0;
|
||||
|
||||
rebootMode = data["other"]["rebootMode"] | false;
|
||||
rebootModeTime = data["other"]["rebootModeTime"] | 6;
|
||||
|
||||
rememberStationTime = data["other"]["rememberStationTime"] | 30;
|
||||
|
||||
backupDigiMode = data["other"]["backupDigiMode"] | false;
|
||||
|
||||
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
|
||||
WiFi_AP wifiap;
|
||||
|
|
@ -307,6 +310,14 @@ void Configuration::init() {
|
|||
|
||||
callsign = "N0CALL-10";
|
||||
|
||||
aprs_is.active = false;
|
||||
aprs_is.passcode = "XYZVW";
|
||||
aprs_is.server = "rotate.aprs2.net";
|
||||
aprs_is.port = 14580;
|
||||
aprs_is.filter = "m/10";
|
||||
aprs_is.messagesToRF = false;
|
||||
aprs_is.objectsToRF = false;
|
||||
|
||||
beacon.comment = "LoRa APRS";
|
||||
beacon.latitude = 0.0;
|
||||
beacon.longitude = 0.0;
|
||||
|
|
@ -318,26 +329,18 @@ void Configuration::init() {
|
|||
beacon.path = "WIDE1-1";
|
||||
|
||||
beacon.statusActive = false;
|
||||
beacon.statusPacket = "";
|
||||
beacon.statusPacket = "";
|
||||
|
||||
beacon.gpsActive = false;
|
||||
beacon.gpsAmbiguity = false;
|
||||
|
||||
personalNote = "";
|
||||
|
||||
blacklist = "";
|
||||
|
||||
digi.mode = 0;
|
||||
digi.ecoMode = 0;
|
||||
|
||||
tnc.enableServer = false;
|
||||
tnc.enableSerial = false;
|
||||
tnc.acceptOwn = false;
|
||||
|
||||
aprs_is.active = false;
|
||||
aprs_is.passcode = "XYZVW";
|
||||
aprs_is.server = "rotate.aprs2.net";
|
||||
aprs_is.port = 14580;
|
||||
aprs_is.filter = "m/10";
|
||||
aprs_is.messagesToRF = false;
|
||||
aprs_is.objectsToRF = false;
|
||||
|
||||
loramodule.txFreq = 433775000;
|
||||
loramodule.rxFreq = 433775000;
|
||||
loramodule.spreadingFactor = 12;
|
||||
|
|
@ -350,21 +353,7 @@ void Configuration::init() {
|
|||
display.alwaysOn = true;
|
||||
display.timeout = 4;
|
||||
display.turn180 = false;
|
||||
|
||||
syslog.active = false;
|
||||
syslog.server = "lora.link9.net";
|
||||
syslog.port = 1514;
|
||||
syslog.logBeaconOverTCPIP = false;
|
||||
|
||||
wxsensor.active = false;
|
||||
wxsensor.heightCorrection = 0;
|
||||
wxsensor.temperatureCorrection = 0.0;
|
||||
|
||||
ota.username = "";
|
||||
ota.password = "";
|
||||
|
||||
rememberStationTime = 30;
|
||||
|
||||
|
||||
battery.sendInternalVoltage = false;
|
||||
battery.monitorInternalVoltage = false;
|
||||
battery.internalSleepVoltage = 2.9;
|
||||
|
|
@ -378,23 +367,18 @@ void Configuration::init() {
|
|||
|
||||
battery.sendVoltageAsTelemetry = false;
|
||||
|
||||
backupDigiMode = false;
|
||||
wxsensor.active = false;
|
||||
wxsensor.heightCorrection = 0;
|
||||
wxsensor.temperatureCorrection = 0.0;
|
||||
|
||||
rebootMode = false;
|
||||
rebootModeTime = 0;
|
||||
syslog.active = false;
|
||||
syslog.server = "lora.link9.net";
|
||||
syslog.port = 1514;
|
||||
syslog.logBeaconOverTCPIP = false;
|
||||
|
||||
personalNote = "";
|
||||
|
||||
blacklist = "";
|
||||
|
||||
webadmin.active = false;
|
||||
webadmin.username = "admin";
|
||||
webadmin.password = "";
|
||||
|
||||
ntp.gmtCorrection = 0.0;
|
||||
|
||||
remoteManagement.managers = "";
|
||||
remoteManagement.rfOnly = true;
|
||||
tnc.enableServer = false;
|
||||
tnc.enableSerial = false;
|
||||
tnc.acceptOwn = false;
|
||||
|
||||
mqtt.active = false;
|
||||
mqtt.server = "";
|
||||
|
|
@ -403,6 +387,25 @@ void Configuration::init() {
|
|||
mqtt.password = "";
|
||||
mqtt.port = 1883;
|
||||
|
||||
ota.username = "";
|
||||
ota.password = "";
|
||||
|
||||
webadmin.active = false;
|
||||
webadmin.username = "admin";
|
||||
webadmin.password = "";
|
||||
|
||||
remoteManagement.managers = "";
|
||||
remoteManagement.rfOnly = true;
|
||||
|
||||
ntp.gmtCorrection = 0.0;
|
||||
|
||||
rebootMode = false;
|
||||
rebootModeTime = 0;
|
||||
|
||||
rememberStationTime = 30;
|
||||
|
||||
backupDigiMode = false;
|
||||
|
||||
Serial.println("All is Written!");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,19 +130,20 @@ namespace WEB_Utils {
|
|||
}
|
||||
|
||||
Config.callsign = request->getParam("callsign", true)->value();
|
||||
|
||||
|
||||
Config.wifiAutoAP.password = request->getParam("wifi.autoAP.password", true)->value();
|
||||
Config.wifiAutoAP.timeout = request->getParam("wifi.autoAP.timeout", true)->value().toInt();
|
||||
|
||||
|
||||
|
||||
Config.aprs_is.active = request->hasParam("aprs_is.active", true);
|
||||
Config.aprs_is.passcode = request->getParam("aprs_is.passcode", true)->value();
|
||||
Config.aprs_is.server = request->getParam("aprs_is.server", true)->value();
|
||||
Config.aprs_is.port = request->getParam("aprs_is.port", true)->value().toInt();
|
||||
Config.aprs_is.filter = request->getParam("aprs_is.filter", true)->value();
|
||||
Config.aprs_is.messagesToRF = request->hasParam("aprs_is.messagesToRF", true);
|
||||
Config.aprs_is.objectsToRF = request->hasParam("aprs_is.objectsToRF", true);
|
||||
|
||||
if (Config.aprs_is.active) {
|
||||
Config.aprs_is.messagesToRF = request->hasParam("aprs_is.messagesToRF", true);
|
||||
Config.aprs_is.objectsToRF = request->hasParam("aprs_is.objectsToRF", true);
|
||||
Config.aprs_is.server = request->getParam("aprs_is.server", true)->value();
|
||||
Config.aprs_is.passcode = request->getParam("aprs_is.passcode", true)->value();
|
||||
Config.aprs_is.port = request->getParam("aprs_is.port", true)->value().toInt();
|
||||
Config.aprs_is.filter = request->getParam("aprs_is.filter", true)->value();
|
||||
}
|
||||
|
||||
Config.beacon.interval = request->getParam("beacon.interval", true)->value().toInt();
|
||||
Config.beacon.sendViaAPRSIS = request->hasParam("beacon.sendViaAPRSIS", true);
|
||||
|
|
@ -155,16 +156,20 @@ namespace WEB_Utils {
|
|||
Config.beacon.path = request->getParam("beacon.path", true)->value();
|
||||
|
||||
Config.beacon.statusActive = request->hasParam("beacon.statusActive", true);
|
||||
Config.beacon.statusPacket = request->getParam("beacon.statusPacket", true)->value();
|
||||
if (Config.beacon.statusActive) {
|
||||
Config.beacon.statusPacket = request->getParam("beacon.statusPacket", true)->value();
|
||||
}
|
||||
|
||||
Config.beacon.gpsActive = request->hasParam("beacon.gpsActive", true);
|
||||
Config.beacon.gpsAmbiguity = request->hasParam("beacon.gpsAmbiguity", true);
|
||||
|
||||
Config.personalNote = request->getParam("personalNote", true)->value();
|
||||
|
||||
Config.blacklist = request->getParam("blacklist", true)->value();
|
||||
|
||||
Config.digi.mode = request->getParam("digi.mode", true)->value().toInt();
|
||||
Config.digi.ecoMode = request->getParam("digi.ecoMode", true)->value().toInt();;
|
||||
|
||||
|
||||
Config.loramodule.txFreq = request->getParam("lora.txFreq", true)->value().toInt();
|
||||
Config.loramodule.rxFreq = request->getParam("lora.rxFreq", true)->value().toInt();
|
||||
Config.loramodule.spreadingFactor = request->getParam("lora.spreadingFactor", true)->value().toInt();
|
||||
|
|
@ -175,16 +180,18 @@ namespace WEB_Utils {
|
|||
Config.loramodule.rxActive = request->hasParam("lora.rxActive", true);
|
||||
|
||||
|
||||
Config.display.alwaysOn = request->hasParam("display.alwaysOn", true);
|
||||
Config.display.alwaysOn = request->hasParam("display.alwaysOn", true);
|
||||
if (!Config.display.alwaysOn) {
|
||||
Config.display.timeout = request->getParam("display.timeout", true)->value().toInt();
|
||||
Config.display.timeout = request->getParam("display.timeout", true)->value().toInt();
|
||||
}
|
||||
Config.display.turn180 = request->hasParam("display.turn180", true);
|
||||
Config.display.turn180 = request->hasParam("display.turn180", true);
|
||||
|
||||
|
||||
Config.battery.sendInternalVoltage = request->hasParam("battery.sendInternalVoltage", true);
|
||||
Config.battery.monitorInternalVoltage = request->hasParam("battery.monitorInternalVoltage", true);
|
||||
Config.battery.internalSleepVoltage = request->getParam("battery.internalSleepVoltage", true)->value().toFloat();
|
||||
if (Config.battery.monitorInternalVoltage) {
|
||||
Config.battery.internalSleepVoltage = request->getParam("battery.internalSleepVoltage", true)->value().toFloat();
|
||||
}
|
||||
|
||||
Config.battery.sendExternalVoltage = request->hasParam("battery.sendExternalVoltage", true);
|
||||
if (Config.battery.sendExternalVoltage) {
|
||||
|
|
@ -193,17 +200,20 @@ namespace WEB_Utils {
|
|||
Config.battery.voltageDividerR2 = request->getParam("battery.voltageDividerR2", true)->value().toFloat();
|
||||
}
|
||||
Config.battery.monitorExternalVoltage = request->hasParam("battery.monitorExternalVoltage", true);
|
||||
Config.battery.externalSleepVoltage = request->getParam("battery.externalSleepVoltage", true)->value().toFloat();
|
||||
|
||||
if (Config.battery.monitorExternalVoltage) {
|
||||
Config.battery.externalSleepVoltage = request->getParam("battery.externalSleepVoltage", true)->value().toFloat();
|
||||
}
|
||||
Config.battery.sendVoltageAsTelemetry = request->hasParam("battery.sendVoltageAsTelemetry", true);
|
||||
|
||||
Config.wxsensor.active = request->hasParam("wxsensor.active", true);
|
||||
Config.wxsensor.heightCorrection = request->getParam("wxsensor.heightCorrection", true)->value().toInt();
|
||||
Config.wxsensor.temperatureCorrection = request->getParam("wxsensor.temperatureCorrection", true)->value().toFloat();
|
||||
|
||||
Config.wxsensor.active = request->hasParam("wxsensor.active", true);
|
||||
if (Config.wxsensor.active) {
|
||||
Config.wxsensor.heightCorrection = request->getParam("wxsensor.heightCorrection", true)->value().toInt();
|
||||
Config.wxsensor.temperatureCorrection = request->getParam("wxsensor.temperatureCorrection", true)->value().toFloat();
|
||||
Config.beacon.symbol = "_";
|
||||
}
|
||||
|
||||
|
||||
Config.syslog.active = request->hasParam("syslog.active", true);
|
||||
if (Config.syslog.active) {
|
||||
Config.syslog.server = request->getParam("syslog.server", true)->value();
|
||||
|
|
@ -211,23 +221,29 @@ namespace WEB_Utils {
|
|||
Config.syslog.logBeaconOverTCPIP = request->hasParam("syslog.logBeaconOverTCPIP", true);
|
||||
}
|
||||
|
||||
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
||||
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
||||
|
||||
Config.rebootMode = request->hasParam("other.rebootMode", true);
|
||||
Config.rebootModeTime = request->getParam("other.rebootModeTime", true)->value().toInt();
|
||||
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
||||
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
||||
|
||||
Config.ota.username = request->getParam("ota.username", true)->value();
|
||||
Config.ota.password = request->getParam("ota.password", true)->value();
|
||||
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
Config.mqtt.active = request->hasParam("mqtt.active", true);
|
||||
if (Config.mqtt.active) {
|
||||
Config.mqtt.server = request->getParam("mqtt.server", true)->value();
|
||||
Config.mqtt.topic = request->getParam("mqtt.topic", true)->value();
|
||||
Config.mqtt.username = request->getParam("mqtt.username", true)->value();
|
||||
Config.mqtt.password = request->getParam("mqtt.password", true)->value();
|
||||
Config.mqtt.port = request->getParam("mqtt.port", true)->value().toInt();
|
||||
}
|
||||
|
||||
Config.backupDigiMode = request->hasParam("other.backupDigiMode", true);
|
||||
|
||||
Config.rebootMode = request->hasParam("other.rebootMode", true);
|
||||
if (Config.rebootMode) {
|
||||
Config.rebootModeTime = request->getParam("other.rebootModeTime", true)->value().toInt();
|
||||
}
|
||||
|
||||
Config.personalNote = request->getParam("personalNote", true)->value();
|
||||
|
||||
Config.blacklist = request->getParam("blacklist", true)->value();
|
||||
Config.ota.username = request->getParam("ota.username", true)->value();
|
||||
Config.ota.password = request->getParam("ota.password", true)->value();
|
||||
|
||||
Config.webadmin.active = request->hasParam("webadmin.active", true);
|
||||
if (Config.webadmin.active) {
|
||||
|
|
@ -235,17 +251,14 @@ namespace WEB_Utils {
|
|||
Config.webadmin.password = request->getParam("webadmin.password", true)->value();
|
||||
}
|
||||
|
||||
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toFloat();
|
||||
|
||||
Config.remoteManagement.managers = request->getParam("remoteManagement.managers", true)->value();
|
||||
Config.remoteManagement.rfOnly = request->hasParam("remoteManagement.rfOnly", true);
|
||||
|
||||
Config.mqtt.active = request->hasParam("mqtt.active", true);
|
||||
Config.mqtt.server = request->getParam("mqtt.server", true)->value();
|
||||
Config.mqtt.topic = request->getParam("mqtt.topic", true)->value();
|
||||
Config.mqtt.username = request->getParam("mqtt.username", true)->value();
|
||||
Config.mqtt.password = request->getParam("mqtt.password", true)->value();
|
||||
Config.mqtt.port = request->getParam("mqtt.port", true)->value().toInt();
|
||||
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toFloat();
|
||||
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
|
||||
Config.backupDigiMode = request->hasParam("other.backupDigiMode", true);
|
||||
|
||||
Config.writeFile();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue