Skip to content

Commit d176b3c

Browse files
committed
Add PointPerfect corrections dropbox to web config
1 parent bf488b4 commit d176b3c

File tree

2 files changed

+84
-32
lines changed

2 files changed

+84
-32
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,36 +1190,50 @@
11901190

11911191
<div>
11921192
Device ID: <p id="hardwareID" style="display:inline;">N/A</p><br>
1193-
Days until keys expire: <p id="daysRemaining" style="display:inline;">No Keys</p>
11941193
</div>
11951194

1196-
<div class="form-check mt-3">
1197-
<label class="form-check-label" for="enablePointPerfectCorrections">Enable PointPerfect
1198-
Corrections </label>
1199-
<input class="form-check-input" type="checkbox" value="" id="enablePointPerfectCorrections">
1200-
<span class="tt" data-bs-placement="right"
1201-
title="Use L-Band / IP PointPerfect corrections when available. Default: Disabled">
1202-
<span class="icon-info-circle text-primary ms-2"></span>
1203-
</span>
1204-
</div>
1205-
1206-
<div id="geographicRegionDropdown">
1207-
<label for="geographicRegion">Geographic Region:</label>
1208-
<select name="geographicRegion" id="geographicRegion" class="form-dropdown mb-2">
1209-
<option value="0">US</option>
1210-
<option value="1">EU</option>
1211-
<option value="2">AU</option>
1212-
<option value="3">KR</option>
1213-
<option value="4">Japan</option>
1195+
<div id="pointPerfectServiceDropdown">
1196+
<label for="pointPerfectService">PointPerfect Service:</label>
1197+
<select name="pointPerfectService" id="pointPerfectService" class="form-dropdown mb-2">
12141198
</select>
12151199
<span class="tt" data-bs-placement="right"
1216-
title="Select your geographic region. This defines the L-Band frequency and Regional Correction topic. Default: US">
1200+
title="Select the PointPerfect service the device has been registered to. Default: Disabled">
12171201
<span class="icon-info-circle text-primary ms-2"></span>
12181202
</span>
12191203
<br>
12201204
</div>
12211205

1222-
<div id="ppSettingsConfig">
1206+
<div id="ppSettingsRtcmConfig">
1207+
<div class="form-check mt-3">
1208+
<label class="form-check-label" for="requestKeyUpdate">Request Key Update </label>
1209+
<input class="form-check-input" type="checkbox" value="" id="requestKeyUpdate">
1210+
<span class="tt" data-bs-placement="right"
1211+
title="When checked, the PointPerfect keys will be requested and updated at the next opportunity. Default: Disabled">
1212+
<span class="icon-info-circle text-primary ms-2"></span>
1213+
</span>
1214+
</div>
1215+
</div>
1216+
1217+
<div id="ppSettingsLBandNAConfig">
1218+
<div>
1219+
Days until keys expire: <p id="daysRemaining" style="display:inline;">No Keys</p>
1220+
</div>
1221+
<div id="geographicRegionDropdown">
1222+
<label for="geographicRegion">Geographic Region:</label>
1223+
<select name="geographicRegion" id="geographicRegion" class="form-dropdown mb-2">
1224+
<option value="0">US</option>
1225+
<option value="1">EU</option>
1226+
<option value="2">AU</option>
1227+
<option value="3">KR</option>
1228+
<option value="4">Japan</option>
1229+
</select>
1230+
<span class="tt" data-bs-placement="right"
1231+
title="Select your geographic region. This defines the L-Band frequency and Regional Correction topic. Default: US">
1232+
<span class="icon-info-circle text-primary ms-2"></span>
1233+
</span>
1234+
<br>
1235+
</div>
1236+
12231237
<div class="form-check mt-3">
12241238
<label class="form-check-label" for="autoKeyRenewal">Auto Key Renewal </label>
12251239
<input class="form-check-input" type="checkbox" value="" id="autoKeyRenewal">
@@ -2202,8 +2216,10 @@
22022216

22032217
<div id="shutdownNoChargeTimeoutMinutesCheckboxDetail">
22042218
<div class="form-check mt-3">
2205-
<label class="form-check-label" for="shutdownNoChargeTimeoutMinutes">Shutdown If Not Charging</label>
2206-
<input class="form-check-input" type="checkbox" value="" id="shutdownNoChargeTimeoutMinutesCheckbox">
2219+
<label class="form-check-label" for="shutdownNoChargeTimeoutMinutes">Shutdown If Not
2220+
Charging</label>
2221+
<input class="form-check-input" type="checkbox" value=""
2222+
id="shutdownNoChargeTimeoutMinutesCheckbox">
22072223
<span class="tt" data-bs-placement="right"
22082224
title="If enabled, device will turn off if no external charger is present. This is helpful when deploying in machinery or where a user may forget to turn the device off. Default: Disabled">
22092225
<span class="icon-info-circle text-primary ms-2"></span>
@@ -2213,7 +2229,8 @@
22132229

22142230
<div id="shutdownNoChargeTimeoutMinutesDetails" class="collapse mb-2">
22152231
<div class="form-group row">
2216-
<label for="shutdownNoChargeTimeoutMinutes" class="box-margin40 col-sm-3 col-7 col-form-label">Minutes before
2232+
<label for="shutdownNoChargeTimeoutMinutes"
2233+
class="box-margin40 col-sm-3 col-7 col-form-label">Minutes before
22172234
shutdown:
22182235
<span class="tt" data-bs-placement="right"
22192236
title="If shutdown is enabled, the device will turn off after this many minutes if no external charger is detected. Limits: 0 (disabled) to 10,080.">

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

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ function parseIncoming(msg) {
124124
hide("shutdownNoChargeTimeoutMinutesCheckboxDetail");
125125

126126
hide("constellationNavic"); //Not supported on ZED
127+
128+
select = ge("pointPerfectService");
129+
let newOption = new Option('Disabled', '0');
130+
select.add(newOption, undefined);
131+
newOption = new Option('Flex NTRIP/RTCM', '1');
132+
select.add(newOption, undefined);
133+
newOption = new Option('Flex L-Band North America', '2');
134+
select.add(newOption, undefined);
127135
}
128136
else if ((platformPrefix == "Facet v2") || (platformPrefix == "Facet v2 LBand")) {
129137
show("baseConfig");
@@ -186,6 +194,14 @@ function parseIncoming(msg) {
186194
ge("messageRateInfoText").setAttribute('data-bs-original-title', 'The GNSS can output NMEA and RTCMv3 at different rates. For NMEA: select a stream for each message, and set an interval for each stream. For RTCMv3: set an interval for each message group, and enable individual messages.');
187195
ge("rtcmRateInfoText").setAttribute('data-bs-original-title', 'RTCM is transmitted by the base at a default of 1Hz for messages 1005, MSM4, and 0.1Hz for 1033. This can be lowered for radios with low bandwidth or tailored to transmit any/all RTCM messages. Limits: 0.1 to 600.');
188196
ge("enableExtCorrRadioInfoText").setAttribute('data-bs-original-title', 'Enable external radio corrections: RTCMv3 on mosaic COM2. Default: False');
197+
198+
select = ge("pointPerfectService");
199+
newOption = new Option('Disabled', '0');
200+
select.add(newOption, undefined);
201+
newOption = new Option('Flex NTRIP/RTCM', '1');
202+
select.add(newOption, undefined);
203+
newOption = new Option('Flex L-Band North America', '2');
204+
select.add(newOption, undefined);
189205
}
190206
else if (platformPrefix == "Torch") {
191207
show("baseConfig");
@@ -215,6 +231,11 @@ function parseIncoming(msg) {
215231

216232
ge("rtcmRateInfoText").setAttribute('data-bs-original-title', 'RTCM is transmitted by the base at a default of 1Hz for messages 1005, 1074, 1084, 1094, 1124, and 0.1Hz for 1033. This can be lowered for radios with low bandwidth or tailored to transmit any/all RTCM messages. Limits: 0 to 20. Note: The measurement rate is overridden to 1Hz when in Base mode.');
217233

234+
select = ge("pointPerfectService");
235+
newOption = new Option('Disabled', '0');
236+
select.add(newOption, undefined);
237+
newOption = new Option('Flex NTRIP/RTCM', '1');
238+
select.add(newOption, undefined);
218239
}
219240
else if (platformPrefix == "Postcard") {
220241
show("baseConfig");
@@ -245,6 +266,12 @@ function parseIncoming(msg) {
245266
hide("minCNOConfig"); //Not supported on LG290P
246267

247268
ge("rtcmRateInfoText").setAttribute('data-bs-original-title', 'RTCM is transmitted by the base at a default of 1Hz for messages 1005, 1074, 1084, 1094, 1114, 1124, 1134. This can be lowered for radios with low bandwidth or tailored to transmit any/all RTCM messages. Limits: 0 to 20. Note: The measurement rate is overridden to 1Hz when in Base mode.');
269+
270+
select = ge("pointPerfectService");
271+
let newOption = new Option('Disabled', '0');
272+
select.add(newOption, undefined);
273+
newOption = new Option('Flex NTRIP/RTCM', '1');
274+
select.add(newOption, undefined);
248275
}
249276
}
250277
else if (id.includes("gnssFirmwareVersionInt")) {
@@ -473,8 +500,10 @@ function parseIncoming(msg) {
473500
correctionsSourceNames.push(correctionNameLabel);
474501
correctionsSourcePriorities.push(correctionPriority);
475502
}
476-
else
503+
else {
477504
console.log("Too many corrections sources");
505+
console.log(correctionsSourceNames.length);
506+
}
478507
}
479508
else if (id.includes("checkingNewFirmware")) {
480509
checkingNewFirmware();
@@ -574,7 +603,7 @@ function parseIncoming(msg) {
574603
ge("enableNtripServer").dispatchEvent(new CustomEvent('change'));
575604
ge("enableNtripClient").dispatchEvent(new CustomEvent('change'));
576605
ge("dataPortChannel").dispatchEvent(new CustomEvent('change'));
577-
ge("enablePointPerfectCorrections").dispatchEvent(new CustomEvent('change'));
606+
ge("pointPerfectService").dispatchEvent(new CustomEvent('change'));
578607
ge("enableExternalPulse").dispatchEvent(new CustomEvent('change'));
579608
ge("enableExternalHardwareEventLogging").dispatchEvent(new CustomEvent('change'));
580609
ge("enableEspNow").dispatchEvent(new CustomEvent('change'));
@@ -893,7 +922,7 @@ function validateFields() {
893922
// }
894923

895924
//PointPerfect Config
896-
if (ge("enablePointPerfectCorrections").checked == true) {
925+
if (ge("pointPerfectService").value > 0) {
897926
value = ge("pointPerfectDeviceProfileToken").value;
898927
if (value.length > 0)
899928
checkElementString("pointPerfectDeviceProfileToken", 36, 36, "Must be 36 characters", "collapsePPConfig");
@@ -1652,12 +1681,18 @@ document.addEventListener("DOMContentLoaded", (event) => {
16521681
}
16531682
});
16541683

1655-
ge("enablePointPerfectCorrections").addEventListener("change", function () {
1656-
if (ge("enablePointPerfectCorrections").checked) {
1657-
show("ppSettingsConfig");
1684+
ge("pointPerfectService").addEventListener("change", function () {
1685+
if (ge("pointPerfectService").value == 1) {
1686+
hide("ppSettingsLBandNAConfig");
1687+
show("ppSettingsRtcmConfig");
16581688
}
1659-
else {
1660-
hide("ppSettingsConfig");
1689+
else if (ge("pointPerfectService").value == 2) {
1690+
hide("ppSettingsRtcmConfig");
1691+
show("ppSettingsLBandNAConfig");
1692+
}
1693+
else { //"pointPerfectService").value == 0
1694+
hide("ppSettingsRtcmConfig");
1695+
hide("ppSettingsLBandNAConfig");
16611696
}
16621697
});
16631698

0 commit comments

Comments
 (0)