Skip to content

Commit 0a7e73b

Browse files
authored
Merge pull request #98 from sparkfun/release_candidate
Real time delivery of ESF-RAW. Add cyclic logging, profiles, faster boot time.
2 parents ca2e93e + 78787d3 commit 0a7e73b

File tree

91 files changed

+4333
-4725
lines changed

Some content is hidden

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

91 files changed

+4333
-4725
lines changed
1.7 MB
Binary file not shown.

Binaries/readme.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ This folder contains the various firmware versions for RTK Products (Surveyor, E
22

33
esptool.exe --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 ./bin/RTK_Surveyor.ino.bootloader.bin 0x8000 ./bin/RTK_Surveyor.ino.partitions.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_vxx.bin
44

5-
Where *COM4* is replaced with the COM port that the RTK product enumerated at and *RTK_Surveyor_Firmware_vxx.bin* is the firmware you would like to load.
5+
Where *COM4* is replaced with the COM port that the RTK product enumerated at and *RTK_Surveyor_Firmware_vxx.bin* is the firmware you would like to load.
6+
7+
---------------------
8+
9+
### Force Firmware Loading
10+
11+
In the rare event a unit is not staying on long enough for new firmware to be loaded into a COM port, the RTK Firmware (as of version 1.2) has an override function. If a file named *RTK_Surveyor_Firmware_Force.bin* is detected on the SD card at boot that file will be used to overwrite the current firmware, and then be deleted. This update path is generally not recommend. Use the [WiFi OTA method](https://learn.sparkfun.com/tutorials/sparkfun-rtk-facet-hookup-guide/all#firmware-updates-and-customization) or via the serial menu as first resort.

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -874,55 +874,57 @@ <h2>
874874
</div>
875875

876876
<div class="form-group row">
877-
<label for="wifiSSID" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
877+
<label for="ntripServer_wifiSSID" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
878878
SSID:</label>
879879
<div class="col-sm-8 col-7">
880-
<input type="text" class="form-control" id="wifiSSID">
881-
<p id="wifiSSIDError" class="inlineError"></p>
880+
<input type="text" class="form-control" id="ntripServer_wifiSSID">
881+
<p id="ntripServer_wifiSSIDError" class="inlineError"></p>
882882
</div>
883883
</div>
884884

885885
<div class="form-group row">
886-
<label for="wifiPW" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi PW:</label>
886+
<label for="ntripServer_wifiPW" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
887+
PW:</label>
887888
<div class="col-sm-8 col-7">
888-
<input type="text" class="form-control" id="wifiPW">
889-
<p id="wifiPWError" class="inlineError"></p>
889+
<input type="text" class="form-control" id="ntripServer_wifiPW">
890+
<p id="ntripServer_wifiPWError" class="inlineError"></p>
890891
</div>
891892
</div>
892893

893894
<div class="form-group row">
894-
<label for="casterHost" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
895+
<label for="ntripServer_CasterHost" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
895896
Host:</label>
896897
<div class="col-sm-8 col-6">
897-
<input type="text" class="form-control" id="casterHost">
898-
<p id="casterHostError" class="inlineError"></p>
898+
<input type="text" class="form-control" id="ntripServer_CasterHost">
899+
<p id="ntripServer_CasterHostError" class="inlineError"></p>
899900
</div>
900901
</div>
901902

902903
<div class="form-group row">
903-
<label for="casterPort" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
904+
<label for="ntripServer_CasterPort" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
904905
Port:</label>
905906
<div class="col-sm-8 col-6">
906-
<input type="text" class="form-control" id="casterPort">
907-
<p id="casterPortError" class="inlineError"></p>
907+
<input type="text" class="form-control" id="ntripServer_CasterPort">
908+
<p id="ntripServer_CasterPortError" class="inlineError"></p>
908909
</div>
909910
</div>
910911

911912
<div class="form-group row">
912-
<label for="mountPointUpload" class="box-margin20 col-sm-3 col-5 col-form-label">Mount
913+
<label for="ntripServer_MountPoint" class="box-margin20 col-sm-3 col-5 col-form-label">Mount
913914
Point:</label>
914915
<div class="col-sm-8 col-6">
915-
<input type="text" class="form-control" id="mountPointUpload">
916-
<p id="mountPointUploadError" class="inlineError"></p>
916+
<input type="text" class="form-control" id="ntripServer_MountPoint">
917+
<p id="ntripServer_MountPointError" class="inlineError"></p>
917918
</div>
918919
</div>
919920

920921
<div class="form-group row">
921-
<label for="mountPointUploadPW" class="box-margin20 col-sm-4 col-6 col-form-label">Mount Point
922+
<label for="ntripServer_MountPointPW" class="box-margin20 col-sm-4 col-6 col-form-label">Mount
923+
Point
922924
PW:</label>
923925
<div class="col-sm-7 col-5">
924-
<input type="text" class="form-control" id="mountPointUploadPW">
925-
<p id="mountPointUploadPWError" class="inlineError"></p>
926+
<input type="text" class="form-control" id="ntripServer_MountPointPW">
927+
<p id="ntripServer_MountPointPWError" class="inlineError"></p>
926928
</div>
927929
</div>
928930
</div>
@@ -1046,7 +1048,7 @@ <h2>
10461048
<div class="col-sm-4 col-9 form-group">
10471049
<label for="maxLogTime_minutes" class="form-group box-margin20">Max Log
10481050
Time (min):</label><span class="tt" data-bs-placement="right"
1049-
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: 600 minutes. Limit: 1 to 2880 minutes.">
1051+
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.">
10501052
<span class="icon-info-circle text-primary ms-2"></span>
10511053
</span>
10521054
</div>
@@ -1055,7 +1057,21 @@ <h2>
10551057
<input type="number" class="form-control" id="maxLogTime_minutes">
10561058
<p id="maxLogTime_minutesError" class="inlineError"></p>
10571059
</div>
1060+
</div>
10581061

1062+
<div id="maxLogLength Input" class="row">
1063+
<div class="col-sm-4 col-9 form-group">
1064+
<label for="maxLogLength_minutes" class="form-group box-margin20">Max Log
1065+
Length (min):</label><span class="tt" data-bs-placement="right"
1066+
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.">
1067+
<span class="icon-info-circle text-primary ms-2"></span>
1068+
</span>
1069+
</div>
1070+
1071+
<div class="col-sm-4 col-5 ms-3 form-group">
1072+
<input type="number" class="form-control" id="maxLogLength_minutes">
1073+
<p id="maxLogLength_minutesError" class="inlineError"></p>
1074+
</div>
10591075
</div>
10601076

10611077
<div class="form-check mt-3">

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

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -288,20 +288,21 @@ function validateFields() {
288288
checkElementValue("fixedEcefX", -5000000, 5000000, "Must be -5000000 to 5000000", "collapseBaseConfig");
289289
checkElementValue("fixedEcefY", -5000000, 5000000, "Must be -5000000 to 5000000", "collapseBaseConfig");
290290
if (ge("fixedEcefZ").value == 0.0) ge("fixedEcefZ").value = 4084500;
291-
checkElementValue("fixedEcefZ", 4084500, 5000000, "Must be 4084500 to 5000000", "collapseBaseConfig");
291+
checkElementValue("fixedEcefZ", 3300000, 5000000, "Must be 3300000 to 5000000", "collapseBaseConfig");
292292
checkElementValue("fixedLat", -180, 180, "Must be -180 to 180", "collapseBaseConfig");
293293
checkElementValue("fixedLong", -180, 180, "Must be -180 to 180", "collapseBaseConfig");
294-
checkElementValue("fixedAltitude", 0, 8849, "Must be 0 to 8849", "collapseBaseConfig");
294+
checkElementValue("fixedAltitude", -11034, 8849, "Must be -11034 to 8849", "collapseBaseConfig");
295295

296-
checkElementString("wifiSSID", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
297-
checkElementString("wifiPW", 0, 30, "Must be 0 to 30 characters", "collapseBaseConfig");
298-
checkElementString("casterHost", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
299-
checkElementValue("casterPort", 1, 99999, "Must be 1 to 99999", "collapseBaseConfig");
300-
checkElementString("mountPointUpload", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
301-
checkElementString("mountPointUploadPW", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
296+
checkElementString("ntripServer_wifiSSID", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
297+
checkElementString("ntripServer_wifiPW", 0, 30, "Must be 0 to 30 characters", "collapseBaseConfig");
298+
checkElementString("ntripServer_CasterHost", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
299+
checkElementValue("ntripServer_CasterPort", 1, 99999, "Must be 1 to 99999", "collapseBaseConfig");
300+
checkElementString("ntripServer_MountPoint", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
301+
checkElementString("ntripServer_MountPointPW", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
302302

303303
//System Config
304304
checkElementValue("maxLogTime_minutes", 1, 2880, "Must be 1 to 2880", "collapseSystemConfig");
305+
checkElementValue("maxLogLength_minutes", 1, 2880, "Must be 1 to 2880", "collapseSystemConfig");
305306

306307
//Port Config
307308

@@ -609,32 +610,34 @@ document.addEventListener("DOMContentLoaded", (event) => {
609610
ge("enableNtripServer").addEventListener("change", function () {
610611
if (ge("enableNtripServer").checked) {
611612
//Enable NTRIP inputs
612-
ge("wifiSSID").disabled = false;
613-
ge("wifiPW").disabled = false;
614-
ge("casterHost").disabled = false;
615-
ge("casterPort").disabled = false;
616-
ge("mountPointUpload").disabled = false;
617-
ge("mountPointUploadPW").disabled = false;
613+
ge("ntripServer_wifiSSID").disabled = false;
614+
ge("ntripServer_wifiPW").disabled = false;
615+
ge("ntripServer_CasterHost").disabled = false;
616+
ge("ntripServer_CasterPort").disabled = false;
617+
ge("ntripServer_MountPoint").disabled = false;
618+
ge("ntripServer_MountPointPW").disabled = false;
618619
}
619620
else {
620621
//Disable NTRIP inputs
621-
ge("wifiSSID").disabled = true;
622-
ge("wifiPW").disabled = true;
623-
ge("casterHost").disabled = true;
624-
ge("casterPort").disabled = true;
625-
ge("mountPointUpload").disabled = true;
626-
ge("mountPointUploadPW").disabled = true;
622+
ge("ntripServer_wifiSSID").disabled = true;
623+
ge("ntripServer_wifiPW").disabled = true;
624+
ge("ntripServer_CasterHost").disabled = true;
625+
ge("ntripServer_CasterPort").disabled = true;
626+
ge("ntripServer_MountPoint").disabled = true;
627+
ge("ntripServer_MountPointPW").disabled = true;
627628
}
628629
});
629630

630631
ge("enableLogging").addEventListener("change", function () {
631632
if (ge("enableLogging").checked) {
632633
//Enable inputs
633634
ge("maxLogTime_minutes").disabled = false;
635+
ge("maxLogLength_minutes").disabled = false;
634636
}
635637
else {
636638
//Disable inputs
637639
ge("maxLogTime_minutes").disabled = true;
640+
ge("maxLogLength_minutes").disabled = true;
638641
}
639642
});
640643

Firmware/RTK_Surveyor/Base.ino

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,36 @@
22
//Configure specific aspects of the receiver for base mode
33
bool configureUbloxModuleBase()
44
{
5+
if (online.gnss == false) return (false);
6+
57
bool response = true;
68
int maxWait = 2000;
79

10+
//If our settings haven't changed, and this is first config since power on, trust ZED's settings
11+
if (updateZEDSettings == false && firstPowerOn == true)
12+
{
13+
firstPowerOn = false; //Next time user switches modes, new settings will be applied
14+
log_d("Skipping ZED Base configuration");
15+
return (true);
16+
}
17+
818
i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM
919

20+
//The first thing we do is go to 1Hz to lighten any I2C traffic from a previous configuration
21+
if (i2cGNSS.getNavigationFrequency(maxWait) != 1)
22+
response &= i2cGNSS.setNavigationFrequency(1, maxWait);
23+
// response &= i2cGNSS.setNavigationFrequency(4, maxWait);
24+
if (response == false)
25+
Serial.println(F("Set rate failed"));
26+
27+
i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM
28+
29+
i2cGNSS.setNMEAGPGGAcallbackPtr(NULL); // Disable GPGGA call back that may have been set during Rover Client mode
30+
i2cGNSS.disableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C); // Disable NMEA message
31+
1032
if (i2cGNSS.getSurveyInActive() == true)
1133
{
34+
log_d("Disabling survey");
1235
response = i2cGNSS.disableSurveyMode(maxWait); //Disable survey
1336
if (response == false)
1437
Serial.println(F("Disable Survey failed"));
@@ -59,6 +82,10 @@ bool configureUbloxModuleBase()
5982
return (false);
6083
}
6184

85+
response &= i2cGNSS.saveConfiguration(); //Save the current settings to flash and BBR
86+
if (response == false)
87+
Serial.println(F("Module failed to save."));
88+
6289
return (response);
6390
}
6491

@@ -226,9 +253,9 @@ void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
226253
}
227254

228255
#ifdef COMPILE_WIFI
229-
if (caster.connected() == true)
256+
if (ntripServer.connected() == true)
230257
{
231-
caster.write(incoming); //Send this byte to socket
258+
ntripServer.write(incoming); //Send this byte to socket
232259
casterBytesSent++;
233260
lastServerSent_ms = millis();
234261
}

0 commit comments

Comments
 (0)