Skip to content

Commit 7773573

Browse files
authored
Merge pull request #768 from sparkfun/pcUpdates_configurePPP_web_config
Hide web config configurePPP on non-LG290P platforms
2 parents 4dc15a9 + b2854db commit 7773573

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,16 +362,18 @@
362362
<span class="icon-info-circle text-primary ms-2"></span>
363363
</span>
364364
</div>
365-
<div class="form-group row">
366-
<label for="configurePPP" class="box-margin20 col-sm-3 col-5 col-form-label">Configure PPP:
367-
<span class="tt" data-bs-placement="right"
368-
title="The configuration string for PPP. Enter values separated by spaces, not commas. Default: 2 1 120 0.10 0.15">
369-
<span class="icon-info-circle text-primary ms-2"></span>
370-
</span>
371-
</label>
372-
<div class="col-sm-8 col-6">
373-
<input type="text" class="form-control" id="configurePPP">
374-
<p id="configurePPPError" class="inlineError"></p>
365+
<div id="configurePppSetting">
366+
<div class="form-group row">
367+
<label for="configurePPP" class="box-margin20 col-sm-3 col-5 col-form-label">Configure PPP:
368+
<span class="tt" data-bs-placement="right"
369+
title="The configuration string for PPP. Enter values separated by spaces, not commas. Default: 2 1 120 0.10 0.15">
370+
<span class="icon-info-circle text-primary ms-2"></span>
371+
</span>
372+
</label>
373+
<div class="col-sm-8 col-6">
374+
<input type="text" class="form-control" id="configurePPP">
375+
<p id="configurePPPError" class="inlineError"></p>
376+
</div>
375377
</div>
376378
</div>
377379
</div>

Firmware/RTK_Everywhere/AP-Config/src/main.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ function parseIncoming(msg) {
226226
hide("constellationSbas"); //Not supported on UM980
227227
hide("constellationNavic"); //Not supported on UM980
228228

229+
show("galileoHasSetting");
230+
hide("lg290pGnssSettings");
231+
229232
show("measurementRateInput");
230233

231234
show("loraConfig");
@@ -711,6 +714,7 @@ function parseIncoming(msg) {
711714
ge("enableARPLogging").dispatchEvent(new CustomEvent('change'));
712715
ge("enableAutoFirmwareUpdate").dispatchEvent(new CustomEvent('change'));
713716
ge("enableAutoReset").dispatchEvent(new CustomEvent('change'));
717+
ge("enableGalileoHas").dispatchEvent(new CustomEvent('change'));
714718

715719
updateECEFList();
716720
updateGeodeticList();
@@ -876,7 +880,7 @@ function validateFields() {
876880
if (isElementShown("lg290pGnssSettings") == true) {
877881
checkElementValue("rtcmMinElev", -90, 90, "Must be between -90 and 90", "collapseGNSSConfig");
878882
}
879-
if (ge("enableGalileoHas").checked == true) {
883+
if (isElementShown("configurePppSetting") == true) {
880884
checkElementStringSpacesNoCommas("configurePPP", 1, 30, "Must be 1 to 30 characters. Separated by spaces. Commas not allowed", "collapseGNSSConfig");
881885
}
882886
if (ge("enableNtripClient").checked == true) {
@@ -2006,6 +2010,20 @@ document.addEventListener("DOMContentLoaded", (event) => {
20062010
adjustHAE();
20072011
});
20082012

2013+
ge("enableGalileoHas").addEventListener("change", function () {
2014+
if ((isElementShown("galileoHasSetting") == true) && (isElementShown("lg290pGnssSettings") == true)) {
2015+
if (ge("enableGalileoHas").checked == true) {
2016+
show("configurePppSetting");
2017+
}
2018+
else {
2019+
hide("configurePppSetting");
2020+
}
2021+
}
2022+
else {
2023+
hide("configurePppSetting"); // Hide on Torch UM980 - i.e. non-LG290P
2024+
}
2025+
});
2026+
20092027
for (let y = 0; y < numCorrectionsSources; y++) {
20102028
var buttonName = "corrPrioButton" + y;
20112029
ge(buttonName).addEventListener("click", function () {

0 commit comments

Comments
 (0)