You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (i2cGNSS.getSurveyInActive() == true) needSurveyReset = true;
69
-
if (i2cGNSS.getSurveyInValid() == true) needSurveyReset = true;
68
+
if (i2cGNSS.getSurveyInActive(100) == true) needSurveyReset = true;
69
+
if (i2cGNSS.getSurveyInValid(100) == true) needSurveyReset = true;
70
70
71
71
if (needSurveyReset == true)
72
72
{
73
+
Serial.println("Resetting survey");
74
+
73
75
if (resetSurvey() == false)
74
76
{
75
77
Serial.println(F("Survey reset failed"));
@@ -80,7 +82,7 @@ bool beginSurveyIn()
80
82
}
81
83
}
82
84
83
-
bool response = i2cGNSS.enableSurveyMode(settings.observationSeconds, settings.observationPositionAccuracy); //Enable Survey in, with user parameters
85
+
bool response = i2cGNSS.enableSurveyMode(settings.observationSeconds, settings.observationPositionAccuracy, 5000); //Enable Survey in, with user parameters. Wait up to 5s.
84
86
if (response == false)
85
87
{
86
88
Serial.println(F("Survey start failed"));
@@ -92,6 +94,15 @@ bool beginSurveyIn()
92
94
settings.observationPositionAccuracy
93
95
);
94
96
97
+
//Wait until active becomes true
98
+
long maxTime = 5000;
99
+
long startTime = millis();
100
+
while(i2cGNSS.getSurveyInActive(100) == false)
101
+
{
102
+
delay(100);
103
+
if(millis() - startTime > maxTime) return(false); //Reset of survey failed
104
+
}
105
+
95
106
return (true);
96
107
}
97
108
@@ -105,8 +116,20 @@ bool resetSurvey()
105
116
response &= i2cGNSS.enableSurveyMode(1000, 400.000, maxWait); //Enable Survey in with bogus values
//We use a local copy of the BluetoothSerial library so that we can increase the RX buffer. See issue: https://github.com/sparkfun/SparkFun_RTK_Surveyor/issues/18
192
192
193
-
//#define COMPILE_BT 1 //Comment out to disable all Bluetooth
193
+
#defineCOMPILE_BT1//Comment out to disable all Bluetooth
0 commit comments