Skip to content

Commit 070e61a

Browse files
authored
Merge pull request #492 from sparkfun/release_candidate
Merge v3.4
2 parents a6ed3a6 + a650a52 commit 070e61a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+27988
-22167
lines changed

.github/workflows/compile-rtk-firmware.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
FILENAME_PREFIX: RTK_Surveyor_Firmware
88
FIRMWARE_VERSION_MAJOR: 3
9-
FIRMWARE_VERSION_MINOR: 3
9+
FIRMWARE_VERSION_MINOR: 4
1010
POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}
1111

1212
jobs:
@@ -75,7 +75,7 @@ jobs:
7575
"SdFat"@2.1.1
7676
"SparkFun LIS2DH12 Arduino Library"@1.0.3
7777
"SparkFun MAX1704x Fuel Gauge Arduino Library"@1.0.4
78-
"SparkFun u-blox GNSS v3"@3.0.9
78+
"SparkFun u-blox GNSS v3"@3.0.14
7979
8080

8181
- name: Enable external libs
@@ -100,9 +100,41 @@ jobs:
100100
cd Firmware/RTK_Surveyor/Patch/
101101
cp Server.h /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32/Server.h
102102
103+
- name: Setup Python
104+
uses: actions/setup-python@v4
105+
with:
106+
python-version: '3.10'
107+
108+
# Configure Python - now we have Python installed, we need to provide everything needed by esptool otherwise the compile fails
109+
- name: Configure Python
110+
run: |
111+
pip3 install pyserial
112+
113+
- name: Update index_html
114+
run: |
115+
cd Firmware/Tools
116+
python index_html_zipper.py ../RTK_Surveyor/AP-Config/index.html ../RTK_Surveyor/form.h
117+
118+
- name: Update main_js
119+
run: |
120+
cd Firmware/Tools
121+
python main_js_zipper.py ../RTK_Surveyor/AP-Config/src/main.js ../RTK_Surveyor/form.h
122+
123+
- name: Commit and push form.h
124+
uses: actions-js/push@master
125+
with:
126+
github_token: ${{ secrets.GITHUB_TOKEN }}
127+
directory: ./Firmware/RTK_Surveyor
128+
branch: ${{ env.BRANCH }}
129+
message: 'Update form.h via Python ${date}'
130+
131+
- name: Copy custom app3M_fat9M_16MB.csv
132+
run:
133+
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/tools/partitions/app3M_fat9M_16MB.csv
134+
103135
- name: Compile Sketch
104136
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/RTK_Surveyor/RTK_Surveyor.ino
105-
--build-property build.partitions=partitions
137+
--build-property build.partitions=app3M_fat9M_16MB
106138
--build-property upload.maximum_size=3145728
107139
--build-property "compiler.cpp.extra_flags=\"-DPOINTPERFECT_TOKEN=$POINTPERFECT_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\""
108140
--export-binaries

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 163 additions & 59 deletions
Large diffs are not rendered by default.

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

Lines changed: 116 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ const CoordinateTypes = {
5959
COORDINATE_INPUT_TYPE_DD_MM_SS: 6, //DD MM SS.ssssss
6060
COORDINATE_INPUT_TYPE_DD_MM_SS_DASH: 7, //DD-MM-SS.ssssss
6161
COORDINATE_INPUT_TYPE_DD_MM_SS_SYMBOL: 8, //DD°MM'SS.ssssss"
62-
COORDINATE_INPUT_TYPE_INVALID_UNKNOWN: 9,
62+
COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL: 9, //DDMMSS - No decimal
63+
COORDINATE_INPUT_TYPE_DD_MM_SS_NO_DECIMAL: 10, //DD MM SS - No decimal
64+
COORDINATE_INPUT_TYPE_DD_MM_SS_DASH_NO_DECIMAL: 11, //DD-MM-SS - No decimal
65+
COORDINATE_INPUT_TYPE_INVALID_UNKNOWN: 12,
6366
}
6467

6568
var convertedCoordinate = 0.0;
@@ -95,6 +98,8 @@ function parseIncoming(msg) {
9598
hide("ppConfig");
9699
hide("ethernetConfig");
97100
hide("ntpConfig");
101+
//hide("allowWiFiOverEthernetClient"); //For future expansion
102+
//hide("allowWiFiOverEthernetServer"); //For future expansion
98103

99104
hide("dataPortChannelDropdown");
100105
}
@@ -104,13 +109,17 @@ function parseIncoming(msg) {
104109
hide("ppConfig");
105110
hide("ethernetConfig");
106111
hide("ntpConfig");
112+
//hide("allowWiFiOverEthernetClient"); //For future expansion
113+
//hide("allowWiFiOverEthernetServer"); //For future expansion
107114
}
108115
else if (platformPrefix == "Express Plus") {
109116
hide("baseConfig");
110117
show("sensorConfig");
111118
hide("ppConfig");
112119
hide("ethernetConfig");
113120
hide("ntpConfig");
121+
//hide("allowWiFiOverEthernetClient"); //For future expansion
122+
//hide("allowWiFiOverEthernetServer"); //For future expansion
114123

115124
ge("muxChannel2").innerHTML = "Wheel/Dir Encoder";
116125
}
@@ -120,13 +129,17 @@ function parseIncoming(msg) {
120129
show("ppConfig");
121130
hide("ethernetConfig");
122131
hide("ntpConfig");
132+
//hide("allowWiFiOverEthernetClient"); //For future expansion
133+
//hide("allowWiFiOverEthernetServer"); //For future expansion
123134
}
124135
else if (platformPrefix == "Reference Station") {
125136
show("baseConfig");
126137
hide("sensorConfig");
127138
hide("ppConfig");
128139
show("ethernetConfig");
129140
show("ntpConfig");
141+
//hide("allowWiFiOverEthernetClient"); //For future expansion
142+
//hide("allowWiFiOverEthernetServer"); //For future expansion
130143
}
131144
}
132145
else if (id.includes("zedFirmwareVersionInt")) {
@@ -335,10 +348,13 @@ function parseIncoming(msg) {
335348
ge("radioType").dispatchEvent(new CustomEvent('change'));
336349
ge("antennaReferencePoint").dispatchEvent(new CustomEvent('change'));
337350
ge("autoIMUmountAlignment").dispatchEvent(new CustomEvent('change'));
351+
ge("enableARPLogging").dispatchEvent(new CustomEvent('change'));
338352

339353
updateECEFList();
340354
updateGeodeticList();
341355
tcpBoxes();
356+
tcpBoxesEthernet();
357+
dhcpEthernet();
342358
updateLatLong();
343359
}
344360

@@ -579,6 +595,7 @@ function validateFields() {
579595
if (ge("enableTcpClient").checked || ge("enableTcpServer").checked) {
580596
checkElementString("wifiTcpPort", 1, 65535, "Must be 1 to 65535", "collapseWiFiConfig");
581597
}
598+
checkCheckboxMutex("enableTcpClient", "enableTcpServer", "TCP Client and Server can not be enabled at the same time", "collapseWiFiConfig");
582599

583600
//System Config
584601
if (ge("enableLogging").checked) {
@@ -590,6 +607,13 @@ function validateFields() {
590607
clearElement("maxLogLength_minutes", 60 * 24);
591608
}
592609

610+
if (ge("enableARPLogging").checked) {
611+
checkElementValue("ARPLoggingInterval", 1, 600, "Must be 1 to 600", "collapseSystemConfig");
612+
}
613+
else {
614+
clearElement("ARPLoggingInterval", 10);
615+
}
616+
593617
//Ethernet
594618
if (platformPrefix == "Reference Station") {
595619
//if (ge("ethernetDHCP").checked == false) {
@@ -599,6 +623,10 @@ function validateFields() {
599623
checkElementIPAddress("ethernetSubnet", "Must be nnn.nnn.nnn.nnn", "collapseEthernetConfig");
600624
checkElementValue("ethernetHttpPort", 0, 65535, "Must be 0 to 65535", "collapseEthernetConfig");
601625
checkElementValue("ethernetNtpPort", 0, 65535, "Must be 0 to 65535", "collapseEthernetConfig");
626+
if (ge("enableTcpClientEthernet").checked) {
627+
checkElementString("ethernetTcpPort", 1, 65535, "Must be 1 to 65535", "collapseEthernetConfig");
628+
checkElementString("hostForTCPClient", 0, 50, "Must be 0 to 50 characters", "collapseEthernetConfig");
629+
}
602630
//}
603631
//else {
604632
// clearElement("ethernetIP", "192.168.0.123");
@@ -822,6 +850,19 @@ function checkElementCasterUser(id, badUserName, errorText, collapseID) {
822850
clearError(id);
823851
}
824852

853+
function checkCheckboxMutex(id1, id2, errorText, collapseID) {
854+
if ((ge(id1).checked) && (ge(id2).checked)) {
855+
ge(id1 + 'Error').innerHTML = 'Error: ' + errorText;
856+
ge(id2 + 'Error').innerHTML = 'Error: ' + errorText;
857+
ge(collapseID).classList.add('show');
858+
errorCount++;
859+
}
860+
else {
861+
clearError(id1);
862+
clearError(id2);
863+
}
864+
}
865+
825866
function clearElement(id, value) {
826867
ge(id).value = value;
827868
clearError(id);
@@ -1135,6 +1176,15 @@ document.addEventListener("DOMContentLoaded", (event) => {
11351176
}
11361177
});
11371178

1179+
ge("enableARPLogging").addEventListener("change", function () {
1180+
if (ge("enableARPLogging").checked) {
1181+
show("enableARPLoggingDetails");
1182+
}
1183+
else {
1184+
hide("enableARPLoggingDetails");
1185+
}
1186+
});
1187+
11381188
ge("fixedAltitude").addEventListener("change", function () {
11391189
adjustHAE();
11401190
});
@@ -1268,12 +1318,12 @@ function addGeodetic() {
12681318
for (; index < recordsGeodetic.length; ++index) {
12691319
var parts = recordsGeodetic[index].split(' ');
12701320
if (ge("nicknameGeodetic").value == parts[0]) {
1271-
recordsGeodetic[index] = nicknameGeodetic.value + ' ' + fixedLat.value + ' ' + fixedLongText.value + ' ' + fixedAltitude.value + ' ' + antennaHeight.value + ' ' + antennaReferencePoint.value;
1321+
recordsGeodetic[index] = nicknameGeodetic.value + ' ' + fixedLatText.value + ' ' + fixedLongText.value + ' ' + fixedAltitude.value + ' ' + antennaHeight.value + ' ' + antennaReferencePoint.value;
12721322
break;
12731323
}
12741324
}
12751325
if (index == recordsGeodetic.length)
1276-
recordsGeodetic.push(nicknameGeodetic.value + ' ' + fixedLat.value + ' ' + fixedLongText.value + ' ' + fixedAltitude.value + ' ' + antennaHeight.value + ' ' + antennaReferencePoint.value);
1326+
recordsGeodetic.push(nicknameGeodetic.value + ' ' + fixedLatText.value + ' ' + fixedLongText.value + ' ' + fixedAltitude.value + ' ' + antennaHeight.value + ' ' + antennaReferencePoint.value);
12771327
}
12781328

12791329
updateGeodeticList();
@@ -1361,7 +1411,16 @@ function updateGeodeticList() {
13611411
$("#StationCoordinatesGeodetic option").each(function () {
13621412
var parts = $(this).text().split(' ');
13631413
var nickname = parts[0].substring(0, 15);
1364-
$(this).text(nickname + ': ' + parts[1] + ' ' + parts[2] + ' ' + parts[3]).text;
1414+
1415+
if (parts.length >= 7) {
1416+
$(this).text(nickname + ': ' + parts[1] + ' ' + parts[2] + ' ' + parts[3]
1417+
+ ' ' + parts[4] + ' ' + parts[5] + ' ' + parts[6]
1418+
+ ' ' + parts[7]).text;
1419+
}
1420+
else {
1421+
$(this).text(nickname + ': ' + parts[1] + ' ' + parts[2] + ' ' + parts[3]).text;
1422+
}
1423+
13651424
});
13661425
}
13671426

@@ -1517,6 +1576,25 @@ function tcpBoxes() {
15171576
}
15181577
}
15191578

1579+
function tcpBoxesEthernet() {
1580+
if (ge("enableTcpClientEthernet").checked) {
1581+
show("tcpSettingsConfigEthernet");
1582+
}
1583+
else {
1584+
hide("tcpSettingsConfigEthernet");
1585+
//ge("ethernetTcpPort").value = 2947;
1586+
}
1587+
}
1588+
1589+
function dhcpEthernet() {
1590+
if (ge("ethernetDHCP").checked) {
1591+
hide("fixedIPSettingsConfigEthernet");
1592+
}
1593+
else {
1594+
show("fixedIPSettingsConfigEthernet");
1595+
}
1596+
}
1597+
15201598
function networkCount() {
15211599
var count = 0;
15221600

@@ -1669,7 +1747,7 @@ function identifyInputType(userEntry) {
16691747
// DD MM SS.ssssss
16701748
// DD-MM-SS.ssssss
16711749

1672-
if (decimalCount != 1) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Just no. 40.09033470 is valid.
1750+
if (decimalCount > 1) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Just no. 40.09033470 is valid.
16731751
if (spaceCount > 2) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Only 0, 1, or 2 allowed. 40 05 25.2049 is valid.
16741752
if (dashCount > 3) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Only 0, 1, 2, or 3 allowed. -105-11-05.1629 is valid.
16751753
if (lengthOfLeadingNumber > 7) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Only 7 or fewer. -1051105.188992 (DDDMMSS or DDMMSS) is valid
@@ -1689,6 +1767,11 @@ function identifyInputType(userEntry) {
16891767
var decimal = Math.trunc(intPortion / 10000); //Get DDD
16901768
intPortion -= (decimal * 10000);
16911769
var minutes = Math.trunc(intPortion / 100); //Get MM
1770+
1771+
//Find '.'
1772+
if (userEntry.indexOf('.') == -1)
1773+
coordinateInputType = CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL;
1774+
16921775
var seconds = userEntry; //Get DDDMMSS.ssssss
16931776
seconds -= (decimal * 10000); //Remove DDD
16941777
seconds -= (minutes * 100); //Remove MM
@@ -1725,6 +1808,11 @@ function identifyInputType(userEntry) {
17251808
var data = userEntry.split('-');
17261809
var decimal = Number(data[0]); //Get DD
17271810
var minutes = Number(data[1]); //Get MM
1811+
1812+
//Find '.'
1813+
if (userEntry.indexOf('.') == -1)
1814+
coordinateInputType = CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH_NO_DECIMAL;
1815+
17281816
var seconds = Number(data[2]); //Get SS.ssssss
17291817
convertedCoordinate = decimal + (minutes / 60.0) + (seconds / 3600.0);
17301818
if (negativeSign) convertedCoordinate *= -1;
@@ -1752,6 +1840,11 @@ function identifyInputType(userEntry) {
17521840
var data = userEntry.split(' ');
17531841
var decimal = Number(data[0]); //Get DD
17541842
var minutes = Number(data[1]); //Get MM
1843+
1844+
//Find '.'
1845+
if (userEntry.indexOf('.') == -1)
1846+
coordinateInputType = CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_NO_DECIMAL;
1847+
17551848
var seconds = Number(data[2]); //Get SS.ssssss
17561849
convertedCoordinate = decimal + (minutes / 60.0) + (seconds / 3600.0);
17571850
if (negativeSign) convertedCoordinate *= -1;
@@ -1796,6 +1889,9 @@ function convertInput(coordinate, coordinateInputType) {
17961889
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS
17971890
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH
17981891
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_SYMBOL
1892+
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL
1893+
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_NO_DECIMAL
1894+
|| coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH_NO_DECIMAL
17991895
) {
18001896
var longitudeDegrees = Math.trunc(coordinate);
18011897
coordinate -= longitudeDegrees;
@@ -1815,8 +1911,14 @@ function convertInput(coordinate, coordinateInputType) {
18151911
coordinateString = longitudeDegrees + "-" + longitudeMinutes + "-" + coordinate;
18161912
else if (coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_SYMBOL)
18171913
coordinateString = longitudeDegrees + "°" + longitudeMinutes + "'" + coordinate + "\"";
1818-
else
1914+
else if (coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS)
18191915
coordinateString = longitudeDegrees + " " + longitudeMinutes + " " + coordinate;
1916+
else if (coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL)
1917+
coordinateString = longitudeDegrees + "" + longitudeMinutes + "" + Math.round(coordinate);
1918+
else if (coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_NO_DECIMAL)
1919+
coordinateString = longitudeDegrees + " " + longitudeMinutes + " " + Math.round(coordinate);
1920+
else if (coordinateInputType == CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH_NO_DECIMAL)
1921+
coordinateString = longitudeDegrees + "-" + longitudeMinutes + "-" + Math.round(coordinate);
18201922
}
18211923

18221924
return (coordinateString);
@@ -1853,8 +1955,14 @@ function printableInputType(coordinateInputType) {
18531955
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS):
18541956
return ("DD MM SS.ssssss");
18551957
break;
1856-
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH):
1857-
return ("DD-MM-SS.ssssss");
1958+
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL):
1959+
return ("DDMMSS");
1960+
break;
1961+
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_NO_DECIMAL):
1962+
return ("DD MM SS");
1963+
break;
1964+
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH_NO_DECIMAL):
1965+
return ("DD-MM-SS");
18581966
break;
18591967
}
18601968
return ("Unknown");

0 commit comments

Comments
 (0)