Skip to content

Commit 1dda69a

Browse files
authored
Merge pull request #265 from sparkfun/more_web_config_tweaks
Resolve #264, also:
2 parents 4142eec + 8c645ef commit 1dda69a

File tree

7 files changed

+1854
-1858
lines changed

7 files changed

+1854
-1858
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 76 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@
11961196

11971197
<!-- --------- Ports Config --------- -->
11981198
<div class="d-grid gap-2">
1199-
<button class="btn btn-primary mt-3 toggle-btn" type="button" data-toggle="collapse"
1199+
<button class="btn btn-primary mt-3 toggle-btn" id="portsConfig" type="button" data-toggle="collapse"
12001200
data-target="#collapsePortsConfig" aria-expanded="false" aria-controls="collapsePortsConfig">
12011201
Ports Configuration <i id="portsCaret" class="caret-icon bi icon-caret-down"></i>
12021202
</button>
@@ -1636,39 +1636,18 @@
16361636
</span>
16371637
</div>
16381638

1639-
<div id="correctionsPriorityList">
1640-
<div style="margin-top:5px;" class="form-group row">
1641-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton0">0</button>
1642-
</div>
1643-
<div style="margin-top:5px;" class="form-group row">
1644-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton1">1</button>
1645-
</div>
1646-
<div style="margin-top:5px;" class="form-group row">
1647-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton2">2</button>
1648-
</div>
1649-
<div style="margin-top:5px;" class="form-group row">
1650-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton3">3</button>
1651-
</div>
1652-
<div style="margin-top:5px;" class="form-group row">
1653-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton4">4</button>
1654-
</div>
1655-
<div style="margin-top:5px;" class="form-group row">
1656-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton5">5</button>
1657-
</div>
1658-
<div style="margin-top:5px;" class="form-group row">
1659-
<button type="button" class="btn btn-primary btn-block" id="corrPrioButton6">6</button>
1660-
</div>
1661-
</div>
1662-
1663-
<div class="form-group row">
1664-
<p id="collapseCorrectionsPriorityConfigError" class="inlineError"></p>
1665-
</div>
1666-
1667-
<div style="margin-top:30px;" class="form-group row">
1668-
<button type="button" id="correctionsPriorityDefaults" class="btn btn-primary btn-block"
1639+
<div class="d-grid gap-2 col-6 mx-auto mt-2" id="correctionsPriorityList">
1640+
<button type="button" class="btn btn-primary" id="corrPrioButton0">0</button>
1641+
<button type="button" class="btn btn-primary" id="corrPrioButton1">1</button>
1642+
<button type="button" class="btn btn-primary" id="corrPrioButton2">2</button>
1643+
<button type="button" class="btn btn-primary" id="corrPrioButton3">3</button>
1644+
<button type="button" class="btn btn-primary" id="corrPrioButton4">4</button>
1645+
<button type="button" class="btn btn-primary" id="corrPrioButton5">5</button>
1646+
<button type="button" class="btn btn-primary" id="corrPrioButton6">6</button>
1647+
<br>
1648+
<button type="button" id="correctionsPriorityDefaults" class="btn btn-primary"
16691649
onClick="resetToCorrectionsPriorityDefaults()">Reset to Defaults</button>
16701650
</div>
1671-
16721651
</div>
16731652
</div>
16741653

@@ -1679,6 +1658,7 @@
16791658
System Configuration <i id="systemCaret" class="caret-icon bi icon-caret-down"></i>
16801659
</button>
16811660
</div>
1661+
16821662
<div class="collapse" id="collapseSystemConfig">
16831663
<div class="card card-body">
16841664

@@ -1746,80 +1726,82 @@
17461726
</span>
17471727
</div>
17481728

1749-
<div class="form-check mt-3">
1750-
<label class="form-check-label" for="enableLogging">Log to SD Card</label>
1751-
<input class="form-check-input" type="checkbox" value="" id="enableLogging">
1752-
<span class="tt" data-bs-placement="right"
1753-
title="If a microSD card is detected, all messages will be logged. Default: Enabled">
1754-
<span class="icon-info-circle text-primary ms-2"></span>
1755-
</span>
1756-
</div>
1757-
1758-
<div id="enableLoggingDetails" class="collapse mb-2">
1759-
1760-
<div class="form-group row">
1761-
<label for="maxLogTime" class="box-margin40 col-sm-3 col-7 col-form-label">Max Log
1762-
Time (min):
1763-
<span class="tt" data-bs-placement="right"
1764-
title="Once the max log time is achieved, logging will cease. This is useful for limiting long term, overnight, static surveys to a certain length of time. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1765-
<span class="icon-info-circle text-primary ms-2"></span>
1766-
</span>
1767-
</label>
1768-
<input type="number" class="form-control box-small" id="maxLogTime">
1769-
<p id="maxLogTimeError" class="inlineError"></p>
1729+
<div id="logToSDCard">
1730+
<div class="form-check mt-3">
1731+
<label class="form-check-label" for="enableLogging">Log to SD Card</label>
1732+
<input class="form-check-input" type="checkbox" value="" id="enableLogging">
1733+
<span class="tt" data-bs-placement="right"
1734+
title="If a microSD card is detected, all messages will be logged. Default: Enabled">
1735+
<span class="icon-info-circle text-primary ms-2"></span>
1736+
</span>
17701737
</div>
17711738

1772-
<div class="form-group row">
1773-
<label for="maxLogLength" class="box-margin40 col-sm-3 col-7 col-form-label">Max Log
1774-
Length (min):<span class="tt" data-bs-placement="right"
1775-
title="Once this length of time is achieved, a new log will be created. This is useful for creating multiple logs over a long survey. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1776-
<span class="icon-info-circle text-primary ms-2"></span>
1777-
</span>
1778-
</label>
1779-
1780-
<input type="number" class="form-control box-small" id="maxLogLength">
1781-
<p id="maxLogLengthError" class="inlineError"></p>
1782-
</div>
1739+
<div id="enableLoggingDetails" class="collapse mb-2">
17831740

1784-
<div id="logFile" class="row">
1785-
<div class="mb-2">
1786-
<label for="logFile" class="form-group box-margin20">Log file name: <span
1787-
id="logFileName" style="display:inline;">SFE_Log.ubx</span>
1741+
<div class="form-group row">
1742+
<label for="maxLogTime" class="box-margin40 col-sm-3 col-7 col-form-label">Max Logging
1743+
Time (min):
1744+
<span class="tt" data-bs-placement="right"
1745+
title="Once the max log time is achieved, logging will cease. This is useful for limiting long term, overnight, static surveys to a certain length of time. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1746+
<span class="icon-info-circle text-primary ms-2"></span>
1747+
</span>
17881748
</label>
1749+
<input type="number" class="form-control box-small" id="maxLogTime">
1750+
<p id="maxLogTimeError" class="inlineError"></p>
17891751
</div>
1790-
</div>
17911752

1792-
<div class="form-group row">
1793-
<div style="margin-bottom:5px;">
1794-
<button type="button" id="startNewLog" class="btn btn-primary box-margin20"
1795-
onClick="startNewLog()">Start New Log</button>
1796-
<span class="tt" data-bs-placement="right"
1797-
title="Closes the current log and starts a new one.">
1798-
<span class="icon-info-circle text-primary ms-2"></span>
1799-
</span>
1753+
<div class="form-group row">
1754+
<label for="maxLogLength" class="box-margin40 col-sm-3 col-7 col-form-label">Max Log
1755+
File Length (min):<span class="tt" data-bs-placement="right"
1756+
title="Once this length of time is achieved, a new log will be created. This is useful for creating multiple logs over a long survey. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1757+
<span class="icon-info-circle text-primary ms-2"></span>
1758+
</span>
1759+
</label>
1760+
1761+
<input type="number" class="form-control box-small" id="maxLogLength">
1762+
<p id="maxLogLengthError" class="inlineError"></p>
18001763
</div>
1801-
</div>
18021764

1803-
<div class="form-check mt-1 box-margin20">
1804-
<label class="form-check-label" for="enableARPLogging">Enable ARP Logging</label>
1805-
<input class="form-check-input" type="checkbox" value="" id="enableARPLogging" unchecked>
1806-
<span class="tt" data-bs-placement="right"
1807-
title="If enabled, the Antenna Reference Position from RTCM 1005/1006 will be added to the log.">
1808-
<span class="icon-info-circle text-primary ms-2"></span>
1809-
</span>
1810-
</div>
1765+
<div id="logFile" class="row">
1766+
<div class="mb-2">
1767+
<label for="logFile" class="form-group box-margin20">Log file name: <span
1768+
id="logFileName" style="display:inline;">SFE_Log.ubx</span>
1769+
</label>
1770+
</div>
1771+
</div>
18111772

1812-
<div id="enableARPLoggingDetails" class="collapse mb-2">
18131773
<div class="form-group row">
1814-
<label for="ARPLoggingInterval" class="box-margin40 col-sm-3 col-7 col-form-label">ARP
1815-
Logging Interval (s):
1774+
<div style="margin-bottom:5px;">
1775+
<button type="button" id="startNewLog" class="btn btn-primary box-margin20"
1776+
onClick="startNewLog()">Start New Log</button>
18161777
<span class="tt" data-bs-placement="right"
1817-
title="If ARP logging is enabled, the Antenna Reference Position will be logged at intervals of this many seconds.">
1778+
title="Closes the current log and starts a new one.">
18181779
<span class="icon-info-circle text-primary ms-2"></span>
18191780
</span>
1820-
</label>
1821-
<input type="number" class="form-control box-small" id="ARPLoggingInterval">
1822-
<p id="ARPLoggingIntervalError" class="inlineError"></p>
1781+
</div>
1782+
</div>
1783+
1784+
<div class="form-check mt-1 box-margin20">
1785+
<label class="form-check-label" for="enableARPLogging">Enable ARP Logging</label>
1786+
<input class="form-check-input" type="checkbox" value="" id="enableARPLogging" unchecked>
1787+
<span class="tt" data-bs-placement="right"
1788+
title="If enabled, the Antenna Reference Position from RTCM 1005/1006 will be added to the log.">
1789+
<span class="icon-info-circle text-primary ms-2"></span>
1790+
</span>
1791+
</div>
1792+
1793+
<div id="enableARPLoggingDetails" class="collapse mb-2">
1794+
<div class="form-group row">
1795+
<label for="ARPLoggingInterval" class="box-margin40 col-sm-3 col-7 col-form-label">ARP
1796+
Logging Interval (s):
1797+
<span class="tt" data-bs-placement="right"
1798+
title="If ARP logging is enabled, the Antenna Reference Position will be logged at intervals of this many seconds.">
1799+
<span class="icon-info-circle text-primary ms-2"></span>
1800+
</span>
1801+
</label>
1802+
<input type="number" class="form-control box-small" id="ARPLoggingInterval">
1803+
<p id="ARPLoggingIntervalError" class="inlineError"></p>
1804+
</div>
18231805
</div>
18241806
</div>
18251807
</div>
@@ -1833,7 +1815,7 @@
18331815
<option value="3">Off</option>
18341816
</select>
18351817
<span class="tt" data-bs-placement="right"
1836-
title="Communicate using Classic Bluetooth Serial Port Profile (SPP), Bluetooth Low-Energy (BLE), or turn Bluetooth off. Default: SPP as nearly all GIS applications use SPP.">
1818+
title="Communicate using Classic Bluetooth Serial Port Profile (SPP), Bluetooth Low-Energy (BLE), or turn Bluetooth off. Default: SPP & BLE.">
18371819
<span class="icon-info-circle text-primary ms-2"></span>
18381820
</span>
18391821
</div>

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,35 @@ function parseIncoming(msg) {
104104
show("ethernetConfig");
105105
show("ntpConfig");
106106
hide("tiltCompensationSettings");
107+
hide("portsConfig");
108+
show("logToSDCard");
107109
}
108110
else if (platformPrefix == "Facet v2") {
109111
show("baseConfig");
110112
show("ppConfig");
111113
hide("ethernetConfig");
112114
hide("ntpConfig");
113115
hide("tiltCompensationSettings");
116+
show("portsConfig");
117+
show("logToSDCard");
114118
}
115119
else if (platformPrefix == "Facet mosaic") {
116120
show("baseConfig");
117121
show("ppConfig");
118122
hide("ethernetConfig");
119123
hide("ntpConfig");
120124
hide("tiltCompensationSettings");
125+
show("portsConfig");
126+
show("logToSDCard");
121127
}
122128
else if (platformPrefix == "Torch") {
123129
show("baseConfig");
124130
show("ppConfig");
125131
hide("ethernetConfig");
126132
hide("ntpConfig");
127133
show("tiltCompensationSettings");
134+
hide("portsConfig");
135+
hide("logToSDCard");
128136

129137
select = ge("dynamicModel");
130138
let newOption = new Option('Survey', '0');
@@ -499,13 +507,12 @@ function sendData() {
499507
function showError(id, errorText) {
500508
ge(id + 'Error').innerHTML = '<br>Error: ' + errorText;
501509
}
502-
503510
function clearError(id) {
504511
ge(id + 'Error').innerHTML = '';
505512
}
506513

507514
function showSuccess(id, msg) {
508-
ge(id + 'Success').innerHTML = '<br>Success: ' + msg;
515+
ge(id + 'Success').innerHTML = '<br>' + msg;
509516
}
510517
function clearSuccess(id) {
511518
ge(id + 'Success').innerHTML = '';
@@ -1214,7 +1221,7 @@ function confirmDataReceipt() {
12141221
//Determine which function sent the original data
12151222
if (sendDataTimeout != null) {
12161223
clearTimeout(sendDataTimeout);
1217-
showSuccess('saveBtn', "All Saved!");
1224+
showSuccess('saveBtn', "Success: All Saved");
12181225
}
12191226
else {
12201227
console.log("Unknown owner of confirmDataReceipt");

Firmware/RTK_Everywhere/UM980.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ bool um980SetRate(double secondsBetweenSolutions)
564564
// If we successfully set rates, only then record to settings
565565
if (response == true)
566566
{
567-
int msBetweenSolutions = secondsBetweenSolutions * 1000;
567+
uint16_t msBetweenSolutions = secondsBetweenSolutions * 1000;
568568
settings.um980MeasurementRateMs = msBetweenSolutions;
569569
}
570570
else
@@ -579,7 +579,7 @@ bool um980SetRate(double secondsBetweenSolutions)
579579
// Returns the seconds between measurements
580580
double um980GetRateS()
581581
{
582-
return (settings.um980MeasurementRateMs / 1000.0);
582+
return (((double)settings.um980MeasurementRateMs) / 1000.0);
583583
}
584584

585585
// Send data directly from ESP GNSS UART1 to UM980 UART3

0 commit comments

Comments
 (0)