@@ -18,6 +18,11 @@ int pin_UART1_RX = 13;
18
18
#define COMPILE_PARSER_STATE_DISPLAY 0
19
19
#define CAPTURE_BYTE_COUNT 8192 // 0 means infinite
20
20
21
+ #define NMEA_PARSER_INDEX 0
22
+ #define UNICORE_HASH_PARSER_INDEX 1
23
+ #define RTCM_PARSER_INDEX 2
24
+ #define UNICORE_BINARY_PARSER_INDEX 3
25
+
21
26
// Build the table listing all of the parsers
22
27
SEMP_PARSE_ROUTINE const parserTable[] =
23
28
{
@@ -64,25 +69,33 @@ void setup()
64
69
Serial.begin (115200 );
65
70
delay (250 );
66
71
Serial.println ();
67
- Serial.println (" SparkFun UM980 Example" );
72
+ Serial.println (" SparkFun UM980 Example 17 " );
68
73
69
74
// We must start the serial port before using it in the library
70
75
SerialGNSS.begin (115200 , SERIAL_8N1, pin_UART1_RX, pin_UART1_TX);
71
76
72
- myGNSS.enableDebugging (); // Print all debug to Serial
77
+ // Enable output from the Unicore GNSS library
78
+ // myGNSS.enableDebugging(); // Print all debug to Serial
79
+
80
+ // Enable various debug options in the Unicore GNSS library
81
+ // myGNSS.enablePrintParserTransitions();
82
+ // myGNSS.enablePrintBadChecksums();
83
+ // myGNSS.enablePrintRxMessages();
84
+ // myGNSS.enableRxMessageDump();
73
85
74
- // Enable debugging
86
+ // Initialize the Unicore GNSS
75
87
if (myGNSS.begin (SerialGNSS) == false ) // Give the serial port over to the library
76
88
{
77
89
Serial.println (" UM980 failed to respond. Check ports and baud rates. Freezing..." );
78
90
while (true );
79
91
}
80
- // myGNSS.enablePrintBadChecksums();
81
- // myGNSS.enablePrintRxMessages();
82
- // myGNSS.enableRxMessageDump();
83
-
84
92
Serial.println (" UM980 detected!" );
85
93
94
+ // Enable low level debugging for the parser in the Unicore GNSS library
95
+ // myGNSS.enableParserDebug();
96
+ // myGNSS.enableParserErrors();
97
+ // myGNSS.printParserConfiguration();
98
+
86
99
// Clear saved configurations, satellite ephemerides, position information, and reset baud rate to 115200bps.
87
100
resetUM980 ();
88
101
@@ -111,7 +124,7 @@ void setup()
111
124
}
112
125
113
126
// Display the firmware version
114
- Serial.printf (" %s\r\n " , myGNSS.getVersionFull ());
127
+ Serial.printf (" %s" , myGNSS.getVersionFull ());
115
128
116
129
// sendCommand() sends the string directly and checks for the OK response
117
130
// Returns true if the OK was detected
@@ -141,6 +154,7 @@ void setup()
141
154
sempEnableDebugOutput (parse);
142
155
143
156
Serial.println (" Mixture of NMEA, RTCM, and UM980 binary now reporting. Have fun!" );
157
+ Serial.println (" ----------------------------------------------------------------" );
144
158
}
145
159
146
160
void loop ()
0 commit comments