Skip to content

Commit

Permalink
fail
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed May 23, 2024
1 parent e161bc2 commit 79f8d91
Show file tree
Hide file tree
Showing 6 changed files with 342 additions and 341 deletions.
1 change: 0 additions & 1 deletion data/igate_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"server": "rotate.aprs2.net",
"port": 14580,
"filter": "m/10",
"toRF": false,
"messagesToRF": false,
"objectsToRF": false
},
Expand Down
102 changes: 56 additions & 46 deletions data_embed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -524,52 +524,6 @@ <h5>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-6">
<div class="form-check form-switch">
<input
type="checkbox"
name="other.sendBatteryVoltage"
id="other.sendBatteryVoltage"
class="form-check-input"
/>
<label
for="other.sendBatteryVoltage"
class="form-label"
>Send Battery Telemetry</label
>
</div>
<div
class="form-check form-switch mt-1"
>
<input
type="checkbox"
name="other.externalVoltageMeasurement"
id="other.externalVoltageMeasurement"
class="form-check-input"
/>
<label
for="other.externalVoltageMeasurement"
class="form-label"
>Measure External Voltage</label
>
</div>
</div>
<div class="form-floating col-6 p-1">
<input
type="text"
name="other.externalVoltagePin"
id="other.externalVoltagePin"
value="34"
class="form-control"
/>
<label
for="other.externalVoltagePin"
class="form-label"
>External Voltage Pin</label
>
</div>
</div>
</div>
</div>
<hr />
Expand Down Expand Up @@ -954,6 +908,62 @@ <h5>
</div>
<hr />

<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
fill="currentColor"
class="bi bi-broadcast-pin"
viewBox="0 0 16 16"
>
<path
d="M3.05 3.05a7 7 0 0 0 0 9.9.5.5 0 0 1-.707.707 8 8 0 0 1 0-11.314.5.5 0 0 1 .707.707m2.122 2.122a4 4 0 0 0 0 5.656.5.5 0 1 1-.708.708 5 5 0 0 1 0-7.072.5.5 0 0 1 .708.708m5.656-.708a.5.5 0 0 1 .708 0 5 5 0 0 1 0 7.072.5.5 0 1 1-.708-.708 4 4 0 0 0 0-5.656.5.5 0 0 1 0-.708m2.122-2.12a.5.5 0 0 1 .707 0 8 8 0 0 1 0 11.313.5.5 0 0 1-.707-.707 7 7 0 0 0 0-9.9.5.5 0 0 1 0-.707zM6 8a2 2 0 1 1 2.5 1.937V15.5a.5.5 0 0 1-1 0V9.937A2 2 0 0 1 6 8"
/>
</svg>
Battery
</h5>
<small>Battery Telemetry & Health</small>
</div>
<div class="col-lg-9 col-sm-12">
<div class="row">
<div class="col-12">
<div class="form-check form-switch">
<input
type="checkbox"
name="battery.sendInternalVoltage"
id="battery.sendInternalVoltage"
class="form-check-input"
/>
<label
for="battery.sendInternalVoltage"
class="form-label"
>Send Internal Voltage</label
>
</div>
</div>
<div class="col-12">
<div class="form-check form-switch">
<input
type="checkbox"
name="battery.sendExternalVoltage"
id="battery.sendExternalVoltage"
class="form-check-input"
/>
<label
for="battery.sendExternalVoltage"
class="form-label"
>Send External Voltage</label
>
</div>
</div>
</div>
</div>
</div>
<hr />

<div class="row my-5 d-flex align-items-top">
<div class="col-lg-3 col-sm-12">
<h5>
Expand Down
77 changes: 40 additions & 37 deletions data_embed/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ alwaysOnCheckbox.addEventListener("change", function () {
// alwaysOnCheckbox.disabled = this.value !== "";
// });

const logCheckbox = document.querySelector('input[name="syslog.active"]');
const serverField = document.querySelector('input[name="syslog.server"]');
const portField = document.querySelector('input[name="syslog.port"]');
const logCheckbox = document.querySelector('input[name="syslog.active"]');
const serverField = document.querySelector('input[name="syslog.server"]');
const portField = document.querySelector('input[name="syslog.port"]');

logCheckbox.addEventListener("change", function () {
serverField.disabled = !this.checked;
Expand All @@ -75,12 +75,8 @@ function loadSettings(settings) {
currentSettings = settings;
// General
document.getElementById("callsign").value = settings.callsign;
// document.getElementById("stationMode").value = settings.stationMode;
document.getElementById("bme.active").checked = settings.bme.active;
document.getElementById("bme.heightCorrection").value = settings.bme.heightCorrection;
document.getElementById("bme.temperatureCorrection").value = settings.bme.temperatureCorrection.toFixed(1);

document.getElementById("beacon.comment").value = settings.beacon.comment;
/*document.getElementById("beacon.comment").value = settings.beacon.comment;
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
document.getElementById("beacon.overlay").value = settings.beacon.overlay;
Expand Down Expand Up @@ -125,7 +121,6 @@ function loadSettings(settings) {
document.getElementById("aprs_is.active").checked = settings.aprs_is.active;
document.getElementById("aprs_is.messagesToRF").checked = settings.aprs_is.messagesToRF;
document.getElementById("aprs_is.objectsToRF").checked = settings.aprs_is.objectsToRF;
//document.getElementById("aprs_is.toRF").checked = settings.aprs_is.toRF;
document.getElementById("aprs_is.server").value = settings.aprs_is.server;
document.getElementById("aprs_is.port").value = settings.aprs_is.port;
document.getElementById("aprs_is.filter").value = settings.aprs_is.filter;
Expand All @@ -145,30 +140,40 @@ function loadSettings(settings) {
document.getElementById("wifi.autoAP.powerOff").value = settings.wifi.autoAP.powerOff;
// Digi
// document.getElementById("digi.comment").value = settings.digi.comment;
// document.getElementById("digi.latitude").value = settings.digi.latitude;
// document.getElementById("digi.longitude").value = settings.digi.longitude;
document.getElementById("digi.mode").value = settings.digi.mode;
// TNC
if (settings.tnc) {
document.getElementById("tnc.enableServer").checked = settings.tnc.enableServer;
document.getElementById("tnc.enableSerial").checked = settings.tnc.enableSerial;
document.getElementById("tnc.acceptOwn").checked = settings.tnc.acceptOwn;
}
// LoRa
document.getElementById("lora.txFreq").value = settings.lora.txFreq;
document.getElementById("lora.rxFreq").value = settings.lora.rxFreq;
document.getElementById("lora.txActive").checked = settings.lora.txActive;
document.getElementById("lora.rxActive").checked = settings.lora.rxActive;
document.getElementById("lora.spreadingFactor").value = settings.lora.spreadingFactor;
document.getElementById("lora.signalBandwidth").value = settings.lora.signalBandwidth;
document.getElementById("lora.codingRate4").value = settings.lora.codingRate4;
document.getElementById("lora.power").value = settings.lora.power;
// OTA
document.getElementById("ota.username").value = settings.ota.username;
document.getElementById("ota.password").value = settings.ota.password;
// Battery
document.getElementById("battery.sendInternalVoltage").checked = settings.battery.sendInternalVoltage;
document.getElementById("battery.sendExternalVoltage").checked = settings.battery.sendExternalVoltage;
document.getElementById("battery.externalVoltagePin").value = settings.battery.externalVoltagePin;
document.getElementById("battery.internalMonitor").checked = settings.battery.internalMonitor;
document.getElementById("battery.internalSleepVoltage").value = settings.battery.internalSleepVoltage;
document.getElementById("battery.externalMonitor").checked = settings.battery.externalMonitor;
document.getElementById("battery.externalSleepVoltage").value = settings.battery.externalSleepVoltage;
// Telemetry BME - WX
document.getElementById("bme.active").checked = settings.bme.active;
document.getElementById("bme.heightCorrection").value = settings.bme.heightCorrection;
document.getElementById("bme.temperatureCorrection").value = settings.bme.temperatureCorrection.toFixed(1);
// Beacon
document.getElementById("beacon.interval").value = settings.beacon.interval;
document.getElementById("other.rememberStationTime").value = settings.other.rememberStationTime;
document.getElementById("other.sendBatteryVoltage").checked = settings.other.sendBatteryVoltage;
/*document.getElementById("other.sendBatteryVoltage").checked = settings.other.sendBatteryVoltage;
document.getElementById("other.externalVoltageMeasurement").checked = settings.other.externalVoltageMeasurement;
document.getElementById("other.externalVoltagePin").value = settings.other.externalVoltagePin;
// document.getElementById("beacon.igateSendsLoRaBeacon").value = settings.beacon.igateSendsLoRaBeacon;
// document.getElementById("beacon.igateRepeatLoRaPackets").value = settings.beacon.igateRepeatLoRaPackets;
document.getElementById("other.externalVoltagePin").value = settings.other.externalVoltagePin;*/

document.getElementById("beacon.path").value = settings.beacon.path;
document.getElementById("beacon.latitude").value = settings.beacon.latitude;
document.getElementById("beacon.longitude").value = settings.beacon.longitude;
Expand All @@ -185,18 +190,16 @@ function loadSettings(settings) {
portField.disabled = false;
}

// LoRa
// document.getElementById("lora.digirepeaterTxFreq").value = settings.lora.digirepeaterTxFreq;
// document.getElementById("lora.iGateFreq").value = settings.lora.iGateFreq;
// document.getElementById("lora.digirepeaterRxFreq").value = settings.lora.digirepeaterRxFreq;
document.getElementById("lora.txFreq").value = settings.lora.txFreq;
document.getElementById("lora.rxFreq").value = settings.lora.rxFreq;
document.getElementById("lora.txActive").checked = settings.lora.txActive;
document.getElementById("lora.rxActive").checked = settings.lora.rxActive;
document.getElementById("lora.spreadingFactor").value = settings.lora.spreadingFactor;
document.getElementById("lora.signalBandwidth").value = settings.lora.signalBandwidth;
document.getElementById("lora.codingRate4").value = settings.lora.codingRate4;
document.getElementById("lora.power").value = settings.lora.power;
// TNC
if (settings.tnc) {
document.getElementById("tnc.enableServer").checked = settings.tnc.enableServer;
document.getElementById("tnc.enableSerial").checked = settings.tnc.enableSerial;
document.getElementById("tnc.acceptOwn").checked = settings.tnc.acceptOwn;
}

// OTA
document.getElementById("ota.username").value = settings.ota.username;
document.getElementById("ota.password").value = settings.ota.password;

// Reboot
document.getElementById("other.rebootMode").checked = settings.other.rebootMode;
Expand Down
63 changes: 61 additions & 2 deletions src/LoRa_APRS_iGate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,72 @@ void setup() {
Utils::checkRebootMode();

//
/*Serial.println(Config.battery.sendInternalVoltage);
/*Serial.println(Config.callsign);
Serial.println(Config.wifiAPs[0].ssid);
Serial.println(Config.wifiAPs[0].password);
Serial.println(" ");
Serial.println(Config.aprs_is.active);
Serial.println(Config.aprs_is.passcode);
Serial.println(Config.aprs_is.server);
Serial.println(Config.aprs_is.port);
Serial.println(Config.aprs_is.filter);
Serial.println(Config.aprs_is.messagesToRF);
Serial.println(Config.aprs_is.objectsToRF);
Serial.println(" ");
Serial.println(Config.beacon.latitude);
Serial.println(Config.beacon.longitude);
Serial.println(Config.beacon.comment);
Serial.println(Config.beacon.overlay);
Serial.println(Config.beacon.symbol);
Serial.println(Config.beacon.interval);
Serial.println(Config.beacon.sendViaRF);
Serial.println(Config.beacon.sendViaAPRSIS);
Serial.println(Config.beacon.path);
Serial.println(" ");
Serial.println(Config.digi.mode);
Serial.println(" ");
Serial.println(Config.lora.txFreq);
Serial.println(Config.lora.rxFreq);
Serial.println(Config.lora.txActive);
Serial.println(Config.lora.rxActive);
Serial.println(Config.lora.spreadingFactor);
Serial.println(Config.lora.signalBandwidth);
Serial.println(Config.lora.codingRate4);
Serial.println(Config.lora.power);
Serial.println(" ");
Serial.println(Config.display.alwaysOn);
Serial.println(Config.display.timeout);
Serial.println(Config.display.turn180);
Serial.println(" ");
Serial.println(Config.battery.sendInternalVoltage);
Serial.println(Config.battery.sendExternalVoltage);
Serial.println(Config.battery.externalVoltagePin);
Serial.println(Config.battery.internalMonitor);
Serial.println(Config.battery.internalSleepVoltage);
Serial.println(Config.battery.externalMonitor);
Serial.println(Config.battery.externalSleepVoltage);*/
Serial.println(Config.battery.externalSleepVoltage);
Serial.println(" ");
Serial.println(Config.bme.active);
Serial.println(Config.bme.heightCorrection);
Serial.println(Config.bme.temperatureCorrection);
Serial.println(" ");
Serial.println(Config.syslog.active);
Serial.println(Config.syslog.server);
Serial.println(Config.syslog.port);
Serial.println(" ");
Serial.println(Config.tnc.enableServer);
Serial.println(Config.tnc.enableSerial);
Serial.println(Config.tnc.acceptOwn);
Serial.println(" ");
Serial.println(Config.ota.username);
Serial.println(Config.ota.password);
Serial.println(" ");
Serial.println(Config.reload);
Serial.println(Config.rememberStationTime);
Serial.println(Config.lowPowerMode);
Serial.println(Config.lowVoltageCutOff);
Serial.println(Config.rebootMode);
Serial.println(Config.rebootModeTime);*/
//
}

Expand Down
Loading

0 comments on commit 79f8d91

Please sign in to comment.