Revert "Long Duration Survey-In Greater Than 65535-seconds"
This commit is contained in:
@@ -6660,7 +6660,7 @@ bool SFE_UBLOX_GNSS::getSurveyMode(uint16_t maxWait)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Control Survey-In for NEO-M8P
|
// Control Survey-In for NEO-M8P
|
||||||
bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint32_t observationTime, float requiredAccuracy, uint16_t maxWait)
|
bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait)
|
||||||
{
|
{
|
||||||
if (getSurveyMode(maxWait) == false) // Ask module for the current TimeMode3 settings. Loads into payloadCfg.
|
if (getSurveyMode(maxWait) == false) // Ask module for the current TimeMode3 settings. Loads into payloadCfg.
|
||||||
return (false);
|
return (false);
|
||||||
@@ -6673,11 +6673,11 @@ bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint32_t observationTime, float
|
|||||||
// payloadCfg should be loaded with poll response. Now modify only the bits we care about
|
// payloadCfg should be loaded with poll response. Now modify only the bits we care about
|
||||||
payloadCfg[2] = mode; // Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT).
|
payloadCfg[2] = mode; // Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT).
|
||||||
|
|
||||||
// svinMinDur is U4 (uint32_t) in seconds
|
// svinMinDur is U4 (uint32_t) but we'll only use a uint16_t (waiting more than 65535 seconds seems excessive!)
|
||||||
payloadCfg[24] = observationTime & 0xFF; // svinMinDur in seconds
|
payloadCfg[24] = observationTime & 0xFF; // svinMinDur in seconds
|
||||||
payloadCfg[25] = observationTime >> 8; // svinMinDur in seconds
|
payloadCfg[25] = observationTime >> 8; // svinMinDur in seconds
|
||||||
payloadCfg[26] = observationTime >> 16;
|
payloadCfg[26] = 0; // Truncate to 16 bits
|
||||||
payloadCfg[27] = observationTime >> 24;
|
payloadCfg[27] = 0; // Truncate to 16 bits
|
||||||
|
|
||||||
// svinAccLimit is U4 (uint32_t) in 0.1mm.
|
// svinAccLimit is U4 (uint32_t) in 0.1mm.
|
||||||
uint32_t svinAccLimit = (uint32_t)(requiredAccuracy * 10000.0); // Convert m to 0.1mm
|
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
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Begin Survey-In for NEO-M8P
|
// Begin Survey-In for NEO-M8P
|
||||||
bool SFE_UBLOX_GNSS::enableSurveyMode(uint32_t observationTime, float requiredAccuracy, uint16_t maxWait)
|
bool SFE_UBLOX_GNSS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait)
|
||||||
{
|
{
|
||||||
return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait));
|
return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -835,8 +835,8 @@ public:
|
|||||||
// Functions used for RTK and base station setup
|
// Functions used for RTK and base station setup
|
||||||
// It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms.
|
// It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms.
|
||||||
bool getSurveyMode(uint16_t maxWait = 250); // Get the current TimeMode3 settings
|
bool getSurveyMode(uint16_t maxWait = 250); // Get the current TimeMode3 settings
|
||||||
bool setSurveyMode(uint8_t mode, uint32_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Control survey in mode
|
bool setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Control survey in mode
|
||||||
bool enableSurveyMode(uint32_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Begin Survey-In for NEO-M8P
|
bool enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); // Begin Survey-In for NEO-M8P
|
||||||
bool disableSurveyMode(uint16_t maxWait = 250); // Stop Survey-In mode
|
bool disableSurveyMode(uint16_t maxWait = 250); // Stop Survey-In mode
|
||||||
// Given coordinates, put receiver into static position. Set latlong to true to pass in lat/long values instead of ecef.
|
// Given coordinates, put receiver into static position. Set latlong to true to pass in lat/long values instead of ecef.
|
||||||
// For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm
|
// For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm
|
||||||
|
|||||||
Reference in New Issue
Block a user