mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-03 20:13:51 +01:00
ready to test Objects to Rf
This commit is contained in:
parent
7add09d346
commit
05a5c096c3
|
|
@ -424,6 +424,38 @@
|
|||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="aprs_is.messagesToRF"
|
||||
id="aprs_is.messagesToRF"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="aprs_is.messagesToRF"
|
||||
class="form-label"
|
||||
>Gate APRS-IS Messages to
|
||||
RF</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="aprs_is.objectsToRF"
|
||||
id="aprs_is.objectsToRF"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="aprs_is.objectsToRF"
|
||||
class="form-label"
|
||||
>Gate APRS-IS Objects to
|
||||
RF</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ namespace APRS_IS_Utils {
|
|||
} else {
|
||||
Utils::print("Received from APRS-IS : " + packet);
|
||||
|
||||
if (Config.aprs_is.toRF && STATION_Utils::wasHeard(Addressee)) {
|
||||
if (/*Config.aprs_is.toRF && */STATION_Utils::wasHeard(Addressee)) {
|
||||
STATION_Utils::addToOutputPacketBuffer(buildPacketToTx(packet));
|
||||
display_toggle(true);
|
||||
lastScreenOn = millis();
|
||||
|
|
|
|||
|
|
@ -195,7 +195,9 @@ bool Configuration::readFile() {
|
|||
|
||||
aprs_is.active = data["aprs_is"]["active"].as<bool>();
|
||||
aprs_is.filter = data["aprs_is"]["filter"].as<String>();
|
||||
//
|
||||
aprs_is.toRF = data["aprs_is"]["toRF"].as<bool>();
|
||||
//
|
||||
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"].as<bool>();
|
||||
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"].as<bool>();
|
||||
|
||||
|
|
@ -312,7 +314,9 @@ void Configuration::init() {
|
|||
aprs_is.server = "rotate.aprs2.net";
|
||||
aprs_is.port = 14580;
|
||||
aprs_is.filter = "m/10"; // new
|
||||
//
|
||||
aprs_is.toRF = false; // new
|
||||
//
|
||||
aprs_is.messagesToRF = false;
|
||||
aprs_is.objectsToRF = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,28 +94,30 @@ namespace WEB_Utils {
|
|||
Config.wifiAPs.push_back(wifiap);
|
||||
}
|
||||
|
||||
Config.callsign = request->getParam("callsign", true)->value();
|
||||
Config.callsign = request->getParam("callsign", true)->value();
|
||||
// Config.iGateComment = request->getParam("iGateComment", true)->value();
|
||||
|
||||
Config.wifiAutoAP.password = request->getParam("wifi.autoAP.password", true)->value();
|
||||
Config.wifiAutoAP.powerOff = request->getParam("wifi.autoAP.powerOff", true)->value().toInt();
|
||||
Config.wifiAutoAP.password = request->getParam("wifi.autoAP.password", true)->value();
|
||||
Config.wifiAutoAP.powerOff = request->getParam("wifi.autoAP.powerOff", true)->value().toInt();
|
||||
|
||||
Config.digi.mode = request->getParam("digi.mode", true)->value().toInt();
|
||||
Config.digi.mode = request->getParam("digi.mode", true)->value().toInt();
|
||||
// Config.digi.comment = request->getParam("digi.comment", true)->value();
|
||||
// Config.digi.latitude = request->getParam("digi.latitude", true)->value().toDouble();
|
||||
// Config.digi.longitude = request->getParam("digi.longitude", true)->value().toDouble();
|
||||
|
||||
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.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
||||
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
||||
|
||||
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.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.reportingDistance = request->getParam("aprs_is.reportingDistance", true)->value().toInt();
|
||||
Config.aprs_is.filter = request->getParam("aprs_is.filter", true)->value();
|
||||
Config.aprs_is.toRF = request->hasParam("aprs_is.toRF", true);
|
||||
Config.aprs_is.filter = request->getParam("aprs_is.filter", true)->value();
|
||||
Config.aprs_is.toRF = request->hasParam("aprs_is.toRF", true);
|
||||
Config.aprs_is.messagesToRF = request->hasParam("aprs_is.messagesToRF", true);
|
||||
Config.aprs_is.objectsToRF = request->hasParam("aprs_is.objectsToRF", true);
|
||||
|
||||
// Config.loramodule.iGateFreq = request->getParam("lora.iGateFreq", true)->value().toInt();
|
||||
// if (request->hasParam("lora.digirepeaterTxFreq", true)) {
|
||||
|
|
@ -125,60 +127,60 @@ namespace WEB_Utils {
|
|||
// Config.loramodule.digirepeaterRxFreq = request->getParam("lora.digirepeaterRxFreq", 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();
|
||||
Config.loramodule.signalBandwidth = request->getParam("lora.signalBandwidth", true)->value().toInt();
|
||||
Config.loramodule.codingRate4 = request->getParam("lora.codingRate4", true)->value().toInt();
|
||||
Config.loramodule.power = request->getParam("lora.power", true)->value().toInt();
|
||||
Config.loramodule.txActive = request->hasParam("lora.txActive", true);
|
||||
Config.loramodule.rxActive = request->hasParam("lora.rxActive", true);
|
||||
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();
|
||||
Config.loramodule.signalBandwidth = request->getParam("lora.signalBandwidth", true)->value().toInt();
|
||||
Config.loramodule.codingRate4 = request->getParam("lora.codingRate4", true)->value().toInt();
|
||||
Config.loramodule.power = request->getParam("lora.power", true)->value().toInt();
|
||||
Config.loramodule.txActive = request->hasParam("lora.txActive", true);
|
||||
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.syslog.active = request->hasParam("syslog.active", true);
|
||||
Config.syslog.active = request->hasParam("syslog.active", true);
|
||||
|
||||
if (Config.syslog.active) {
|
||||
Config.syslog.server = request->getParam("syslog.server", true)->value();
|
||||
Config.syslog.port = request->getParam("syslog.port", true)->value().toInt();
|
||||
Config.syslog.server = request->getParam("syslog.server", true)->value();
|
||||
Config.syslog.port = request->getParam("syslog.port", true)->value().toInt();
|
||||
}
|
||||
|
||||
Config.bme.active = request->hasParam("bme.active", true);
|
||||
Config.bme.heightCorrection = request->getParam("bme.heightCorrection", true)->value().toInt();
|
||||
Config.bme.temperatureCorrection = request->getParam("bme.temperatureCorrection", true)->value().toFloat();
|
||||
Config.bme.active = request->hasParam("bme.active", true);
|
||||
Config.bme.heightCorrection = request->getParam("bme.heightCorrection", true)->value().toInt();
|
||||
Config.bme.temperatureCorrection = request->getParam("bme.temperatureCorrection", true)->value().toFloat();
|
||||
|
||||
Config.ota.username = request->getParam("ota.username", true)->value();
|
||||
Config.ota.password = request->getParam("ota.password", true)->value();
|
||||
Config.ota.username = request->getParam("ota.username", true)->value();
|
||||
Config.ota.password = request->getParam("ota.password", true)->value();
|
||||
|
||||
Config.beacon.interval = request->getParam("beacon.interval", true)->value().toInt();
|
||||
Config.beacon.sendViaAPRSIS = request->hasParam("beacon.sendViaAPRSIS", true);
|
||||
Config.beacon.sendViaRF = request->hasParam("beacon.sendViaRF", true);
|
||||
Config.beacon.latitude = request->getParam("beacon.latitude", true)->value().toDouble();
|
||||
Config.beacon.longitude = request->getParam("beacon.longitude", true)->value().toDouble();
|
||||
Config.beacon.comment = request->getParam("beacon.comment", true)->value();
|
||||
Config.beacon.overlay = request->getParam("beacon.overlay", true)->value();
|
||||
Config.beacon.symbol = request->getParam("beacon.symbol", true)->value();
|
||||
Config.beacon.path = request->getParam("beacon.path", true)->value();
|
||||
Config.beacon.interval = request->getParam("beacon.interval", true)->value().toInt();
|
||||
Config.beacon.sendViaAPRSIS = request->hasParam("beacon.sendViaAPRSIS", true);
|
||||
Config.beacon.sendViaRF = request->hasParam("beacon.sendViaRF", true);
|
||||
Config.beacon.latitude = request->getParam("beacon.latitude", true)->value().toDouble();
|
||||
Config.beacon.longitude = request->getParam("beacon.longitude", true)->value().toDouble();
|
||||
Config.beacon.comment = request->getParam("beacon.comment", true)->value();
|
||||
Config.beacon.overlay = request->getParam("beacon.overlay", true)->value();
|
||||
Config.beacon.symbol = request->getParam("beacon.symbol", true)->value();
|
||||
Config.beacon.path = request->getParam("beacon.path", true)->value();
|
||||
|
||||
// Config.beaconInterval = request->getParam("other.beaconInterval", true)->value().toInt();
|
||||
// Config.igateSendsLoRaBeacons = request->hasParam("other.igateSendsLoRaBeacons", true);
|
||||
// Config.igateRepeatsLoRaPackets = request->hasParam("other.igateRepeatsLoRaPackets", true);
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
Config.sendBatteryVoltage = request->hasParam("other.sendBatteryVoltage", true);
|
||||
Config.externalVoltageMeasurement = request->hasParam("other.externalVoltageMeasurement", true);
|
||||
Config.rememberStationTime = request->getParam("other.rememberStationTime", true)->value().toInt();
|
||||
Config.sendBatteryVoltage = request->hasParam("other.sendBatteryVoltage", true);
|
||||
Config.externalVoltageMeasurement = request->hasParam("other.externalVoltageMeasurement", true);
|
||||
|
||||
if (Config.externalVoltageMeasurement) {
|
||||
Config.externalVoltagePin = request->getParam("other.externalVoltagePin", true)->value().toInt();
|
||||
Config.externalVoltagePin = request->getParam("other.externalVoltagePin", true)->value().toInt();
|
||||
}
|
||||
|
||||
Config.lowPowerMode = request->hasParam("other.lowPowerMode", true);
|
||||
Config.lowVoltageCutOff = request->getParam("other.lowVoltageCutOff", true)->value().toDouble();
|
||||
Config.lowPowerMode = request->hasParam("other.lowPowerMode", true);
|
||||
Config.lowVoltageCutOff = request->getParam("other.lowVoltageCutOff", true)->value().toDouble();
|
||||
|
||||
if (Config.bme.active) {
|
||||
Config.beacon.symbol = "_";
|
||||
|
|
@ -186,7 +188,7 @@ namespace WEB_Utils {
|
|||
|
||||
Config.writeFile();
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");
|
||||
AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");
|
||||
response->addHeader("Location", "/");
|
||||
request->send(response);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue