Skip to content

Commit 7978752

Browse files
authored
Merge branch 'release_candidate' into SurveyMasterDocs
2 parents 384c085 + d9bf85c commit 7978752

40 files changed

+5945
-2317
lines changed

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,44 @@ <h2>
8787
<div align="center" class="small">
8888
<span id="rtkFirmwareVersion" style="display:inline;">RTK Firmware: v0.0</span> <br>
8989
<span id="zedFirmwareVersion" style="display:inline;">ZED-F9P Firmware: v0.0</span> <br>
90-
<span id="profileName" style="display:inline;">Profile Name: Default</span>
9190
</div>
9291
</div>
9392

9493
<hr class="mt-0">
9594
<div style="margin-top:20px;">
95+
96+
<!-- --------- Profile Config --------- -->
97+
<div class="d-grid gap-2">
98+
<button class="btn btn-primary toggle-btn" id="profileConfig" type="button" data-toggle="collapse"
99+
data-target="#collapseProfileConfig" aria-expanded="false" aria-controls="collapseProfileConfig">
100+
Profile Configuration <i id="profileCaret" class="caret-icon bi icon-caret-down"></i>
101+
</button>
102+
</div>
103+
<div class="collapse mb-2" id="collapseProfileConfig">
104+
<div class="card card-body">
105+
<div class="form-group row">
106+
<label for="profileNumber" class="box-margin20 col-sm-3 col-4 col-form-label">Profile Number</label>
107+
<div class="col-sm-8 col-7">
108+
<input type="number" class="form-control mb-2" id="profileNumber">
109+
<p id="profileNumberError" class="inlineError"></p>
110+
</div>
111+
</div>
112+
113+
<div class="form-group row">
114+
<label for="profileName" class="box-margin20 col-sm-3 col-4 col-form-label">Profile Name</label>
115+
<div class="col-sm-8 col-7">
116+
<input type="text" class="form-control" id="profileName">
117+
<p id="profileNameError" class="inlineError"></p>
118+
</div>
119+
</div>
120+
</div>
121+
</div>
122+
96123
<!-- --------- GNSS Config --------- -->
97124
<div class="d-grid gap-2">
98-
<button class="btn btn-primary toggle-btn" type="button" data-toggle="collapse"
125+
<button class="btn btn-primary mt-3 toggle-btn" type="button" data-toggle="collapse"
99126
data-target="#collapseGNSSConfig" aria-expanded="false" aria-controls="collapseGNSSConfig">
100-
GNSS Configuration <i class="caret-icon bi icon-caret-up"></i>
127+
GNSS Configuration <i id="gnssCaret" class="caret-icon bi icon-caret-up"></i>
101128
</button>
102129
</div>
103130
<div class="collapse show" id="collapseGNSSConfig">
@@ -265,8 +292,8 @@ <h2>
265292
<input type="text" class="form-control" id="ntripClient_MountPointPW">
266293
<p id="ntripClient_MountPointPWError" class="inlineError"></p>
267294
</div>
268-
</div>
269-
295+
</div>
296+
270297
<div class="form-check mt-1 box-margin20">
271298
<label class="form-check-label" for="ntripClient_TransmitGGA">Transmit GGA to Caster</label>
272299
<input class="form-check-input" type="checkbox" value="" id="ntripClient_TransmitGGA" unchecked>
@@ -276,12 +303,12 @@ <h2>
276303
</span>
277304
</div>
278305
</div>
279-
306+
280307
<div id="messageRateButton">
281308
<button class="btn btn-md btn-outline-primary mt-3 toggle-btn" type="button"
282309
data-toggle="collapse" data-target="#collapseGNSSConfigMsg" aria-expanded="false"
283310
aria-controls="collapseGNSSConfigMsg">
284-
Message Rates <i class="caret-icon bi icon-caret-down"></i>
311+
Message Rates <i id="gnssMsgCaret" class="caret-icon bi icon-caret-down"></i>
285312
</button>
286313
<span class="tt" data-bs-placement="right"
287314
title="NMEA and RAWX are the two most commonly reported types of message but the receiver supports more than 70 different messages. Each message rate input controls which messages are disabled (0) and how often the message is reported (1 = one message reported per 1 fix, 5 = one report every 5 fixes). Default: NMEA GGA, GSA, GST, GSV, and RMC. Limits: 0 to 20.">
@@ -846,7 +873,7 @@ <h2>
846873
<div class="d-grid gap-2">
847874
<button class="btn btn-primary mt-3 toggle-btn" id="baseConfig" type="button" data-toggle="collapse"
848875
data-target="#collapseBaseConfig" aria-expanded="false" aria-controls="collapseBaseConfig">
849-
Base Configuration <i class="caret-icon bi icon-caret-down"></i>
876+
Base Configuration <i id="baseCaret" class="caret-icon bi icon-caret-down"></i>
850877
</button>
851878
</div>
852879
<div class="collapse" id="collapseBaseConfig">
@@ -1055,7 +1082,7 @@ <h2>
10551082
<div class="d-grid gap-2">
10561083
<button class="btn btn-primary mt-3 toggle-btn" id="sensorConfig" type="button" data-toggle="collapse"
10571084
data-target="#collapseSensorConfig" aria-expanded="false" aria-controls="collapseSensorConfig">
1058-
Sensor Configuration <i class="caret-icon bi icon-caret-down"></i>
1085+
Sensor Configuration <i id="sensorCaret" class="caret-icon bi icon-caret-down"></i>
10591086
</button>
10601087
</div>
10611088
<div class="collapse" id="collapseSensorConfig">
@@ -1083,7 +1110,7 @@ <h2>
10831110
<div class="d-grid gap-2">
10841111
<button class="btn btn-primary mt-3 toggle-btn" id="ppConfig" type="button" data-toggle="collapse"
10851112
data-target="#collapsePPConfig" aria-expanded="false" aria-controls="collapsePPConfig">
1086-
PointPerfect Configuration <i class="caret-icon bi icon-caret-down"></i>
1113+
PointPerfect Configuration <i id="pointPerfectCaret" class="caret-icon bi icon-caret-down"></i>
10871114
</button>
10881115
</div>
10891116
<div class="collapse" id="collapsePPConfig">
@@ -1149,12 +1176,12 @@ <h2>
11491176
</div>
11501177
</div>
11511178
</div>
1152-
1179+
11531180
<!-- --------- Ports Config --------- -->
11541181
<div class="d-grid gap-2">
11551182
<button class="btn btn-primary mt-3 toggle-btn" type="button" data-toggle="collapse"
11561183
data-target="#collapsePortsConfig" aria-expanded="false" aria-controls="collapsePortsConfig">
1157-
Ports Configuration <i class="caret-icon bi icon-caret-down"></i>
1184+
Ports Configuration <i id="portsCaret" class="caret-icon bi icon-caret-down"></i>
11581185
</button>
11591186
</div>
11601187
<div class="collapse" id="collapsePortsConfig">
@@ -1270,7 +1297,7 @@ <h2>
12701297
<div class="d-grid gap-2">
12711298
<button class="btn btn-primary mt-3 toggle-btn" type="button" data-toggle="collapse"
12721299
data-target="#collapseSystemConfig" aria-expanded="false" aria-controls="collapseSystemConfig">
1273-
System Configuration <i class="caret-icon bi icon-caret-down"></i>
1300+
System Configuration <i id="systemCaret" class="caret-icon bi icon-caret-down"></i>
12741301
</button>
12751302
</div>
12761303
<div class="collapse" id="collapseSystemConfig">
@@ -1397,4 +1424,4 @@ <h2>
13971424
</script>
13981425
</body>
13991426

1400-
</html>
1427+
</html>

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

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ function parseIncoming(msg) {
8282
|| id.includes("sdUsedSpace")
8383
|| id.includes("rtkFirmwareVersion")
8484
|| id.includes("zedFirmwareVersion")
85-
|| id.includes("profileName")
8685
|| id.includes("hardwareID")
8786
|| id.includes("daysRemaining")
8887
) {
@@ -123,6 +122,8 @@ function parseIncoming(msg) {
123122
//console.log("Settings loaded");
124123

125124
//Force element updates
125+
ge("profileNumber").dispatchEvent(new CustomEvent('change'));
126+
ge("profileName").dispatchEvent(new CustomEvent('change'));
126127
ge("measurementRateHz").dispatchEvent(new CustomEvent('change'));
127128
ge("baseTypeSurveyIn").dispatchEvent(new CustomEvent('change'));
128129
ge("baseTypeFixed").dispatchEvent(new CustomEvent('change'));
@@ -186,18 +187,30 @@ function checkMessageValue(id) {
186187
checkElementValue(id, 0, 20, "Must be between 0 and 20", "collapseGNSSConfigMsg");
187188
}
188189

190+
function collapseSection(section, caret) {
191+
ge(section).classList.remove('show');
192+
ge(caret).classList.remove('icon-caret-down');
193+
ge(caret).classList.remove('icon-caret-up');
194+
ge(caret).classList.add('icon-caret-down');
195+
}
196+
189197
function validateFields() {
190198
//Collapse all sections
191-
ge("collapseGNSSConfig").classList.remove('show');
192-
ge("collapseGNSSConfigMsg").classList.remove('show');
193-
ge("collapseBaseConfig").classList.remove('show');
194-
ge("collapseSensorConfig").classList.remove('show');
195-
ge("collapsePPConfig").classList.remove('show');
196-
ge("collapsePortsConfig").classList.remove('show');
197-
ge("collapseSystemConfig").classList.remove('show');
199+
collapseSection("collapseProfileConfig", "profileCaret");
200+
collapseSection("collapseGNSSConfig", "gnssCaret");
201+
collapseSection("collapseGNSSConfigMsg", "gnssMsgCaret");
202+
collapseSection("collapseBaseConfig", "baseCaret");
203+
collapseSection("collapseSensorConfig", "sensorCaret");
204+
collapseSection("collapsePPConfig", "pointPerfectCaret");
205+
collapseSection("collapsePortsConfig", "portsCaret");
206+
collapseSection("collapseSystemConfig", "systemCaret");
198207

199208
errorCount = 0;
200209

210+
//Profile Config
211+
checkElementValue("profileNumber", 1, 4, "Must be between 1 and 4", "collapseProfileConfig");
212+
checkElementString("profileName", 1, 49, "Must be 1 to 49 characters", "collapseProfileConfig");
213+
201214
//GNSS Config
202215
checkElementValue("measurementRateHz", 0.00012, 10, "Must be between 0.00012 and 10Hz", "collapseGNSSConfig");
203216
checkConstellations();
@@ -378,7 +391,7 @@ function validateFields() {
378391
if(ge("enablePointPerfectCorrections").checked == true) {
379392
checkElementString("home_wifiSSID", 1, 30, "Must be 1 to 30 characters", "collapsePPConfig");
380393
checkElementString("home_wifiPW", 0, 30, "Must be 0 to 30 characters", "collapsePPConfig");
381-
394+
382395
value = ge("pointPerfectDeviceProfileToken").value;
383396
console.log(value);
384397
if (value.length > 0)
@@ -736,4 +749,4 @@ document.addEventListener("DOMContentLoaded", (event) => {
736749
}
737750
});
738751

739-
})
752+
})

Firmware/RTK_Surveyor/Base.ino

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ bool configureUbloxModuleBase()
1414
return (true);
1515
}
1616

17+
firstPowerOn = false; //If we switch between rover/base in the future, force config of module.
18+
1719
i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM
1820

1921
//The first thing we do is go to 1Hz to lighten any I2C traffic from a previous configuration
@@ -28,13 +30,9 @@ bool configureUbloxModuleBase()
2830
i2cGNSS.setNMEAGPGGAcallbackPtr(NULL); // Disable GPGGA call back that may have been set during Rover Client mode
2931
i2cGNSS.disableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C); // Disable NMEA message
3032

31-
if (i2cGNSS.getSurveyInActive() == true)
32-
{
33-
log_d("Disabling survey");
34-
response = i2cGNSS.disableSurveyMode(maxWait); //Disable survey
35-
if (response == false)
36-
Serial.println(F("Disable Survey failed"));
37-
}
33+
response = i2cGNSS.setSurveyMode(0, 0, 0); //Disable Survey-In or Fixed Mode
34+
if (response == false)
35+
Serial.println(F("Disable TMODE3 failed"));
3836

3937
//In base mode we force 1Hz
4038
if (i2cGNSS.getNavigationFrequency(maxWait) != 1)
@@ -139,11 +137,11 @@ bool resetSurvey()
139137
int maxWait = 2000;
140138

141139
//Slightly modified method for restarting survey-in from: https://portal.u-blox.com/s/question/0D52p00009IsVoMCAV/restarting-surveyin-on-an-f9p
142-
bool response = i2cGNSS.disableSurveyMode(maxWait); //Disable survey
140+
bool response = i2cGNSS.setSurveyMode(maxWait, 0, 0); //Disable Survey-In or Fixed Mode
143141
delay(1000);
144142
response &= i2cGNSS.enableSurveyMode(1000, 400.000, maxWait); //Enable Survey in with bogus values
145143
delay(1000);
146-
response &= i2cGNSS.disableSurveyMode(maxWait); //Disable survey
144+
response &= i2cGNSS.setSurveyMode(maxWait, 0, 0); //Disable Survey-In or Fixed Mode
147145

148146
if (response == false)
149147
return (response);
@@ -229,34 +227,5 @@ bool startFixedBase()
229227
//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc.
230228
void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
231229
{
232-
//Count outgoing packets for display
233-
//Assume 1Hz RTCM transmissions
234-
if (millis() - lastRTCMPacketSent > 500)
235-
{
236-
lastRTCMPacketSent = millis();
237-
rtcmPacketsSent++;
238-
}
239-
240-
//Check for too many digits
241-
if (settings.enableResetDisplay == true)
242-
{
243-
if (rtcmPacketsSent > 99) rtcmPacketsSent = 1; //Trim to two digits to avoid overlap
244-
}
245-
else if (logIncreasing == true)
246-
{
247-
if (rtcmPacketsSent > 999) rtcmPacketsSent = 1; //Trim to three digits to avoid log icon
248-
}
249-
else
250-
{
251-
if (rtcmPacketsSent > 9999) rtcmPacketsSent = 1;
252-
}
253-
254-
#ifdef COMPILE_WIFI
255-
if (ntripServer.connected() == true)
256-
{
257-
ntripServer.write(incoming); //Send this byte to socket
258-
casterBytesSent++;
259-
lastServerSent_ms = millis();
260-
}
261-
#endif
230+
ntripServerProcessRTCM(incoming);
262231
}

0 commit comments

Comments
 (0)