Skip to content

Commit 50b2dc7

Browse files
authored
Merge pull request #118 from sparkfun/revert-117-patch-1
Revert "Long Duration Survey-In Greater Than 65535-seconds" - move to release_candidate
2 parents 60e9dc0 + 689ef50 commit 50b2dc7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -6660,7 +6660,7 @@ bool SFE_UBLOX_GNSS::getSurveyMode(uint16_t maxWait)
66606660
}
66616661

66626662
// Control Survey-In for NEO-M8P
6663-
bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint32_t observationTime, float requiredAccuracy, uint16_t maxWait)
6663+
bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait)
66646664
{
66656665
if (getSurveyMode(maxWait) == false) // Ask module for the current TimeMode3 settings. Loads into payloadCfg.
66666666
return (false);
@@ -6673,11 +6673,11 @@ bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint32_t observationTime, float
66736673
// payloadCfg should be loaded with poll response. Now modify only the bits we care about
66746674
payloadCfg[2] = mode; // Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT).
66756675

6676-
// svinMinDur is U4 (uint32_t) in seconds
6676+
// svinMinDur is U4 (uint32_t) but we'll only use a uint16_t (waiting more than 65535 seconds seems excessive!)
66776677
payloadCfg[24] = observationTime & 0xFF; // svinMinDur in seconds
66786678
payloadCfg[25] = observationTime >> 8; // svinMinDur in seconds
6679-
payloadCfg[26] = observationTime >> 16;
6680-
payloadCfg[27] = observationTime >> 24;
6679+
payloadCfg[26] = 0; // Truncate to 16 bits
6680+
payloadCfg[27] = 0; // Truncate to 16 bits
66816681

66826682
// svinAccLimit is U4 (uint32_t) in 0.1mm.
66836683
uint32_t svinAccLimit = (uint32_t)(requiredAccuracy * 10000.0); // Convert m to 0.1mm
@@ -6690,7 +6690,7 @@ bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint32_t observationTime, float
66906690
}
66916691

66926692
// Begin Survey-In for NEO-M8P
6693-
bool SFE_UBLOX_GNSS::enableSurveyMode(uint32_t observationTime, float requiredAccuracy, uint16_t maxWait)
6693+
bool SFE_UBLOX_GNSS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait)
66946694
{
66956695
return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait));
66966696
}

Diff for: src/SparkFun_u-blox_GNSS_Arduino_Library.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,8 @@ class SFE_UBLOX_GNSS
835835
// Functions used for RTK and base station setup
836836
// It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms.
837837
bool getSurveyMode(uint16_t maxWait = 250); // Get the current TimeMode3 settings
838-
bool setSurveyMode(uint8_t mode, uint32_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Control survey in mode
839-
bool enableSurveyMode(uint32_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Begin Survey-In for NEO-M8P
838+
bool setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Control survey in mode
839+
bool enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Begin Survey-In for NEO-M8P
840840
bool disableSurveyMode(uint16_t maxWait = 250); // Stop Survey-In mode
841841
// Given coordinates, put receiver into static position. Set latlong to true to pass in lat/long values instead of ecef.
842842
// For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm

0 commit comments

Comments
 (0)