@@ -33,7 +33,15 @@ void um980Begin()
33
33
if (settings.debugGnss == true )
34
34
um980EnableDebugging ();
35
35
36
- um980->disableBinaryBeforeFix (); // Block the start of BESTNAV and RECTIME until 3D fix is achieved
36
+ // In order to reduce UM980 configuration time, the UM980 library blocks the start of BESTNAV and RECTIME until 3D fix is achieved
37
+ // However, if all NMEA messages are disabled, the UM980 will never detect a 3D fix.
38
+ if (um980IsGgaActive () == true )
39
+ // If NMEA GPGGA is turned on, suppress BESTNAV messages until GPGGA reports a 3D fix
40
+ um980->disableBinaryBeforeFix ();
41
+ else
42
+ // If NMEA GPGGA is turned off, enable BESTNAV messages at power on which may lead to longer UM980 configuration times
43
+ um980->enableBinaryBeforeFix ();
44
+
37
45
38
46
if (um980->begin (*serialGNSS) == false ) // Give the serial port over to the library
39
47
{
@@ -297,7 +305,8 @@ bool um980ConfigureBase()
297
305
bool response = true ;
298
306
299
307
// Set the dynamic mode. This will cancel any base averaging mode and is needed
300
- // to allow a freshly started device to settle in regular GNSS reception mode before issuing um980BaseAverageStart().
308
+ // to allow a freshly started device to settle in regular GNSS reception mode before issuing
309
+ // um980BaseAverageStart().
301
310
response &= um980SetModel (settings.dynamicModel );
302
311
303
312
response &= um980EnableRTCMBase (); // Only turn on messages, do not turn off messages. We assume the caller has
@@ -832,6 +841,8 @@ bool um980SetModeRoverSurvey()
832
841
return (um980->setModeRoverSurvey ());
833
842
}
834
843
844
+ // If we have received serial data from the UM980 outside of the Unicore library (ie, from processUart1Message task)
845
+ // we can pass data back into the Unicore library to allow it to update its own variables
835
846
void um980UnicoreHandler (uint8_t *buffer, int length)
836
847
{
837
848
um980->unicoreHandler (buffer, length);
@@ -862,10 +873,37 @@ uint8_t um980GetActiveMessageCount()
862
873
{
863
874
uint8_t count = 0 ;
864
875
876
+ count += um980GetActiveNmeaMessageCount ();
877
+
878
+ count += um980GetActiveRtcmMessageCount ();
879
+
880
+ return (count);
881
+ }
882
+
883
+ uint8_t um980GetActiveNmeaMessageCount ()
884
+ {
885
+ uint8_t count = 0 ;
886
+
865
887
for (int x = 0 ; x < MAX_UM980_NMEA_MSG; x++)
866
888
if (settings.um980MessageRatesNMEA [x] > 0 )
867
889
count++;
868
890
891
+ return (count);
892
+ }
893
+
894
+ // Return true if the GPGGA message is active
895
+ bool um980IsGgaActive ()
896
+ {
897
+ // 2 = GPGGA. We could do this with a walking text search but this is sufficient.
898
+ if (settings.um980MessageRatesNMEA [2 ] > 0 )
899
+ return (true );
900
+ return (false );
901
+ }
902
+
903
+ uint8_t um980GetActiveRtcmMessageCount ()
904
+ {
905
+ uint8_t count = 0 ;
906
+
869
907
// Determine which state we are in
870
908
if (um980InRoverMode () == true )
871
909
{
0 commit comments