Skip to content

Real time delivery of ESF-RAW. Add cyclic logging, profiles, faster boot time. #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 69 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
f8b5f2c
Fix links to issues to point to current repo
nseidle Mar 2, 2022
8c1a834
Add StayOn sketch
nseidle Mar 7, 2022
51adb15
Add display init to correct long term corruption.
nseidle Mar 10, 2022
0d4ed6b
Add display error printing
nseidle Mar 10, 2022
03d158f
Reduce gnss serial timeout to 0
nseidle Mar 10, 2022
37dabde
Add lat/long/stat info to debug menu
nseidle Mar 14, 2022
21a35f4
Add SIV to debug menu
nseidle Mar 14, 2022
17f79f7
Remove SARA support
nseidle Mar 14, 2022
ee2a261
Add cyclic logging issue #43
nseidle Mar 14, 2022
7480357
Adding compilation instructions.
nseidle Mar 14, 2022
4f8364b
Update readme.md
nseidle Mar 21, 2022
5971fb0
Error check for allowable SPI freq at start
nseidle Mar 23, 2022
b6e728b
Create system status menu. Move debug menu into status menu.
nseidle Mar 23, 2022
4353ec8
Remove hard stop when GNSS fails. Add GNSS online testing.
nseidle Mar 23, 2022
6e5fd2a
Convert to new OLED library
nseidle Mar 25, 2022
423af4e
Update battery example
nseidle Mar 28, 2022
972c8e2
Comment update
nseidle Mar 28, 2022
84787b7
Move from EEPROM to LittleFS to support multiple profiles.
nseidle Mar 30, 2022
3417f8b
Increase logging limit to 2 years.
nseidle Mar 30, 2022
d7b61d2
Add profile selection from display menu.
nseidle Mar 30, 2022
9347e0a
Add back display reset using new OLED library
nseidle Mar 30, 2022
0627ba8
Add external trigger settings and profile name to file recording.
nseidle Mar 30, 2022
0eb5082
Fix Status Menu for Surveyor (no display)
nseidle Mar 30, 2022
36356bd
Add automatic power off for startup with 5% or less. Issue #83
nseidle Mar 30, 2022
3a89ac9
Add status report when ~ is received
nseidle Mar 31, 2022
7c3e551
Merge pull request #87 from sparkfun/StatusQuery
nseidle Mar 31, 2022
7816b11
Re-enable PPS signal. Move system reset to system menu.
nseidle Mar 31, 2022
7fa46d3
Remove SurveyIn example, add GNSS position example
nseidle Mar 31, 2022
ab1abd9
Update GNSS_GetPosition.ino
nseidle Mar 31, 2022
77d55d0
Fix typos in comments
nseidle Mar 31, 2022
fe525af
Update test sketches. Remove old, add SD.
nseidle Mar 31, 2022
00f7248
Add Button test sketch. Remove outdated test sketches.
nseidle Mar 31, 2022
6e12b17
Fix BT connection test under system status menu
nseidle Mar 31, 2022
c2fa0d3
Add hardware test for UART1 ZED <-> UART2 ESP connection
nseidle Mar 31, 2022
bc2099f
Move SD contents to system status menu. Remove test menu.
nseidle Mar 31, 2022
4b0d14c
Add SD presence detection to decrease boot time
nseidle Mar 31, 2022
7d9129b
Config ZED only when needed to reduce boot time
nseidle Mar 31, 2022
0a2ad72
Use callbacks for GNSS data.
nseidle Apr 1, 2022
7b756a3
Create RTK_Surveyor_Firmware_v1_11-RCApr1.bin
nseidle Apr 1, 2022
a92eb28
Update RTK_Surveyor.ino
nseidle Apr 1, 2022
ae71913
Add NTRIP Client
nseidle Apr 4, 2022
4407c63
Correct setting file name in factoryReset to use profiles
nseidle Apr 4, 2022
4177e83
Remove print of string with potentially no terminator
nseidle Apr 4, 2022
33c41d1
Modify SD quick tests to prevent false negatives
nseidle Apr 4, 2022
544b62e
Add NTRIP Client settings to NVM
nseidle Apr 4, 2022
1dc7798
Merge pull request #92 from sparkfun/release_candidate_v1_12
nseidle Apr 4, 2022
d8cfd99
Move NTRIP Client icons up to avoid corruption
nseidle Apr 4, 2022
04267b3
Increase program partition to 3MB
nseidle Apr 4, 2022
55c8893
Fix failing UART2 serial test
nseidle Apr 4, 2022
5a478cc
Add WiFi compile guards to new code
nseidle Apr 4, 2022
ed780ea
Decrease I2C bus rate
nseidle Apr 4, 2022
92fd826
Modify examples to facilitate I2C bus testing
nseidle Apr 4, 2022
95cc07b
Add charging exception to 5% battery check
nseidle Apr 4, 2022
0cf7cd3
Add menu config for initial positional accuracy before Survey-In
nseidle Apr 4, 2022
59a259d
Update partition instructions
nseidle Apr 4, 2022
11135e0
Adjust location of download arrow
nseidle Apr 4, 2022
293a4ff
Change default ZED state to output NMEA, to support NTRIP Client GGA.
nseidle Apr 4, 2022
a55d1ca
Mark ZED config when profile changes
nseidle Apr 5, 2022
ae14ea7
Set main talker ID before/after NTRIP Client
nseidle Apr 5, 2022
99b9a6c
Add profile switching for Express/+
nseidle Apr 5, 2022
9d161b0
Fix issue #90 - turn off logging icon when not logging
nseidle Apr 5, 2022
f1a26a5
Display dynamic model when connecting NTRIP Client
nseidle Apr 5, 2022
8ef0a71
Gracefully fail if caster does not respond.
nseidle Apr 5, 2022
e93a20e
Adding documentation for #95
nseidle Apr 8, 2022
d280829
Negative altitude over WiFi config - fix issue #97
nseidle Apr 12, 2022
253ff7a
Move older binaries into sub folder
nseidle Apr 12, 2022
080b830
Lower ECEF Z for issue #97
nseidle Apr 12, 2022
49ce1b2
Fix bad logic on SD quick test
nseidle Apr 12, 2022
78787d3
Release v1.11 binaries
nseidle Apr 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Binaries/RTK_Surveyor_Firmware_v1_11.bin
Binary file not shown.
8 changes: 7 additions & 1 deletion Binaries/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ This folder contains the various firmware versions for RTK Products (Surveyor, E

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

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.
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.

---------------------

### Force Firmware Loading

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.
54 changes: 35 additions & 19 deletions Firmware/RTK_Surveyor/AP-Config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -874,55 +874,57 @@ <h2>
</div>

<div class="form-group row">
<label for="wifiSSID" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
<label for="ntripServer_wifiSSID" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
SSID:</label>
<div class="col-sm-8 col-7">
<input type="text" class="form-control" id="wifiSSID">
<p id="wifiSSIDError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_wifiSSID">
<p id="ntripServer_wifiSSIDError" class="inlineError"></p>
</div>
</div>

<div class="form-group row">
<label for="wifiPW" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi PW:</label>
<label for="ntripServer_wifiPW" class="box-margin20 col-sm-3 col-4 col-form-label">WiFi
PW:</label>
<div class="col-sm-8 col-7">
<input type="text" class="form-control" id="wifiPW">
<p id="wifiPWError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_wifiPW">
<p id="ntripServer_wifiPWError" class="inlineError"></p>
</div>
</div>

<div class="form-group row">
<label for="casterHost" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
<label for="ntripServer_CasterHost" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
Host:</label>
<div class="col-sm-8 col-6">
<input type="text" class="form-control" id="casterHost">
<p id="casterHostError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_CasterHost">
<p id="ntripServer_CasterHostError" class="inlineError"></p>
</div>
</div>

<div class="form-group row">
<label for="casterPort" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
<label for="ntripServer_CasterPort" class="box-margin20 col-sm-3 col-5 col-form-label">Caster
Port:</label>
<div class="col-sm-8 col-6">
<input type="text" class="form-control" id="casterPort">
<p id="casterPortError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_CasterPort">
<p id="ntripServer_CasterPortError" class="inlineError"></p>
</div>
</div>

<div class="form-group row">
<label for="mountPointUpload" class="box-margin20 col-sm-3 col-5 col-form-label">Mount
<label for="ntripServer_MountPoint" class="box-margin20 col-sm-3 col-5 col-form-label">Mount
Point:</label>
<div class="col-sm-8 col-6">
<input type="text" class="form-control" id="mountPointUpload">
<p id="mountPointUploadError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_MountPoint">
<p id="ntripServer_MountPointError" class="inlineError"></p>
</div>
</div>

<div class="form-group row">
<label for="mountPointUploadPW" class="box-margin20 col-sm-4 col-6 col-form-label">Mount Point
<label for="ntripServer_MountPointPW" class="box-margin20 col-sm-4 col-6 col-form-label">Mount
Point
PW:</label>
<div class="col-sm-7 col-5">
<input type="text" class="form-control" id="mountPointUploadPW">
<p id="mountPointUploadPWError" class="inlineError"></p>
<input type="text" class="form-control" id="ntripServer_MountPointPW">
<p id="ntripServer_MountPointPWError" class="inlineError"></p>
</div>
</div>
</div>
Expand Down Expand Up @@ -1046,7 +1048,7 @@ <h2>
<div class="col-sm-4 col-9 form-group">
<label for="maxLogTime_minutes" class="form-group box-margin20">Max Log
Time (min):</label><span class="tt" data-bs-placement="right"
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.">
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.">
<span class="icon-info-circle text-primary ms-2"></span>
</span>
</div>
Expand All @@ -1055,7 +1057,21 @@ <h2>
<input type="number" class="form-control" id="maxLogTime_minutes">
<p id="maxLogTime_minutesError" class="inlineError"></p>
</div>
</div>

<div id="maxLogLength Input" class="row">
<div class="col-sm-4 col-9 form-group">
<label for="maxLogLength_minutes" class="form-group box-margin20">Max Log
Length (min):</label><span class="tt" data-bs-placement="right"
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.">
<span class="icon-info-circle text-primary ms-2"></span>
</span>
</div>

<div class="col-sm-4 col-5 ms-3 form-group">
<input type="number" class="form-control" id="maxLogLength_minutes">
<p id="maxLogLength_minutesError" class="inlineError"></p>
</div>
</div>

<div class="form-check mt-3">
Expand Down
43 changes: 23 additions & 20 deletions Firmware/RTK_Surveyor/AP-Config/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,21 @@ function validateFields() {
checkElementValue("fixedEcefX", -5000000, 5000000, "Must be -5000000 to 5000000", "collapseBaseConfig");
checkElementValue("fixedEcefY", -5000000, 5000000, "Must be -5000000 to 5000000", "collapseBaseConfig");
if (ge("fixedEcefZ").value == 0.0) ge("fixedEcefZ").value = 4084500;
checkElementValue("fixedEcefZ", 4084500, 5000000, "Must be 4084500 to 5000000", "collapseBaseConfig");
checkElementValue("fixedEcefZ", 3300000, 5000000, "Must be 3300000 to 5000000", "collapseBaseConfig");
checkElementValue("fixedLat", -180, 180, "Must be -180 to 180", "collapseBaseConfig");
checkElementValue("fixedLong", -180, 180, "Must be -180 to 180", "collapseBaseConfig");
checkElementValue("fixedAltitude", 0, 8849, "Must be 0 to 8849", "collapseBaseConfig");
checkElementValue("fixedAltitude", -11034, 8849, "Must be -11034 to 8849", "collapseBaseConfig");

checkElementString("wifiSSID", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementString("wifiPW", 0, 30, "Must be 0 to 30 characters", "collapseBaseConfig");
checkElementString("casterHost", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementValue("casterPort", 1, 99999, "Must be 1 to 99999", "collapseBaseConfig");
checkElementString("mountPointUpload", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementString("mountPointUploadPW", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementString("ntripServer_wifiSSID", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementString("ntripServer_wifiPW", 0, 30, "Must be 0 to 30 characters", "collapseBaseConfig");
checkElementString("ntripServer_CasterHost", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementValue("ntripServer_CasterPort", 1, 99999, "Must be 1 to 99999", "collapseBaseConfig");
checkElementString("ntripServer_MountPoint", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");
checkElementString("ntripServer_MountPointPW", 1, 30, "Must be 1 to 30 characters", "collapseBaseConfig");

//System Config
checkElementValue("maxLogTime_minutes", 1, 2880, "Must be 1 to 2880", "collapseSystemConfig");
checkElementValue("maxLogLength_minutes", 1, 2880, "Must be 1 to 2880", "collapseSystemConfig");

//Port Config

Expand Down Expand Up @@ -609,32 +610,34 @@ document.addEventListener("DOMContentLoaded", (event) => {
ge("enableNtripServer").addEventListener("change", function () {
if (ge("enableNtripServer").checked) {
//Enable NTRIP inputs
ge("wifiSSID").disabled = false;
ge("wifiPW").disabled = false;
ge("casterHost").disabled = false;
ge("casterPort").disabled = false;
ge("mountPointUpload").disabled = false;
ge("mountPointUploadPW").disabled = false;
ge("ntripServer_wifiSSID").disabled = false;
ge("ntripServer_wifiPW").disabled = false;
ge("ntripServer_CasterHost").disabled = false;
ge("ntripServer_CasterPort").disabled = false;
ge("ntripServer_MountPoint").disabled = false;
ge("ntripServer_MountPointPW").disabled = false;
}
else {
//Disable NTRIP inputs
ge("wifiSSID").disabled = true;
ge("wifiPW").disabled = true;
ge("casterHost").disabled = true;
ge("casterPort").disabled = true;
ge("mountPointUpload").disabled = true;
ge("mountPointUploadPW").disabled = true;
ge("ntripServer_wifiSSID").disabled = true;
ge("ntripServer_wifiPW").disabled = true;
ge("ntripServer_CasterHost").disabled = true;
ge("ntripServer_CasterPort").disabled = true;
ge("ntripServer_MountPoint").disabled = true;
ge("ntripServer_MountPointPW").disabled = true;
}
});

ge("enableLogging").addEventListener("change", function () {
if (ge("enableLogging").checked) {
//Enable inputs
ge("maxLogTime_minutes").disabled = false;
ge("maxLogLength_minutes").disabled = false;
}
else {
//Disable inputs
ge("maxLogTime_minutes").disabled = true;
ge("maxLogLength_minutes").disabled = true;
}
});

Expand Down
31 changes: 29 additions & 2 deletions Firmware/RTK_Surveyor/Base.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,36 @@
//Configure specific aspects of the receiver for base mode
bool configureUbloxModuleBase()
{
if (online.gnss == false) return (false);

bool response = true;
int maxWait = 2000;

//If our settings haven't changed, and this is first config since power on, trust ZED's settings
if (updateZEDSettings == false && firstPowerOn == true)
{
firstPowerOn = false; //Next time user switches modes, new settings will be applied
log_d("Skipping ZED Base configuration");
return (true);
}

i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM

//The first thing we do is go to 1Hz to lighten any I2C traffic from a previous configuration
if (i2cGNSS.getNavigationFrequency(maxWait) != 1)
response &= i2cGNSS.setNavigationFrequency(1, maxWait);
// response &= i2cGNSS.setNavigationFrequency(4, maxWait);
if (response == false)
Serial.println(F("Set rate failed"));

i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM

i2cGNSS.setNMEAGPGGAcallbackPtr(NULL); // Disable GPGGA call back that may have been set during Rover Client mode
i2cGNSS.disableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C); // Disable NMEA message

if (i2cGNSS.getSurveyInActive() == true)
{
log_d("Disabling survey");
response = i2cGNSS.disableSurveyMode(maxWait); //Disable survey
if (response == false)
Serial.println(F("Disable Survey failed"));
Expand Down Expand Up @@ -59,6 +82,10 @@ bool configureUbloxModuleBase()
return (false);
}

response &= i2cGNSS.saveConfiguration(); //Save the current settings to flash and BBR
if (response == false)
Serial.println(F("Module failed to save."));

return (response);
}

Expand Down Expand Up @@ -226,9 +253,9 @@ void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
}

#ifdef COMPILE_WIFI
if (caster.connected() == true)
if (ntripServer.connected() == true)
{
caster.write(incoming); //Send this byte to socket
ntripServer.write(incoming); //Send this byte to socket
casterBytesSent++;
lastServerSent_ms = millis();
}
Expand Down
Loading