Skip to content

Commit 87168f8

Browse files
authored
Merge pull request #11 from LeeLeahy2/no-parser
Removing Unicore parser, using the SparkFun Extensible Message Parser
2 parents 3da0ad6 + 8c96d1e commit 87168f8

File tree

5 files changed

+223
-1066
lines changed

5 files changed

+223
-1066
lines changed

examples/Example17_Parser/Example17_Parser.ino

+22-8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ int pin_UART1_RX = 13;
1818
#define COMPILE_PARSER_STATE_DISPLAY 0
1919
#define CAPTURE_BYTE_COUNT 8192 // 0 means infinite
2020

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+
2126
// Build the table listing all of the parsers
2227
SEMP_PARSE_ROUTINE const parserTable[] =
2328
{
@@ -64,25 +69,33 @@ void setup()
6469
Serial.begin(115200);
6570
delay(250);
6671
Serial.println();
67-
Serial.println("SparkFun UM980 Example");
72+
Serial.println("SparkFun UM980 Example 17");
6873

6974
//We must start the serial port before using it in the library
7075
SerialGNSS.begin(115200, SERIAL_8N1, pin_UART1_RX, pin_UART1_TX);
7176

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();
7385

74-
// Enable debugging
86+
// Initialize the Unicore GNSS
7587
if (myGNSS.begin(SerialGNSS) == false) //Give the serial port over to the library
7688
{
7789
Serial.println("UM980 failed to respond. Check ports and baud rates. Freezing...");
7890
while (true);
7991
}
80-
// myGNSS.enablePrintBadChecksums();
81-
// myGNSS.enablePrintRxMessages();
82-
// myGNSS.enableRxMessageDump();
83-
8492
Serial.println("UM980 detected!");
8593

94+
// Enable low level debugging for the parser in the Unicore GNSS library
95+
// myGNSS.enableParserDebug();
96+
// myGNSS.enableParserErrors();
97+
// myGNSS.printParserConfiguration();
98+
8699
// Clear saved configurations, satellite ephemerides, position information, and reset baud rate to 115200bps.
87100
resetUM980();
88101

@@ -111,7 +124,7 @@ void setup()
111124
}
112125

113126
// Display the firmware version
114-
Serial.printf("%s\r\n", myGNSS.getVersionFull());
127+
Serial.printf("%s", myGNSS.getVersionFull());
115128

116129
//sendCommand() sends the string directly and checks for the OK response
117130
//Returns true if the OK was detected
@@ -141,6 +154,7 @@ void setup()
141154
sempEnableDebugOutput(parse);
142155

143156
Serial.println("Mixture of NMEA, RTCM, and UM980 binary now reporting. Have fun!");
157+
Serial.println("----------------------------------------------------------------");
144158
}
145159

146160
void loop()

0 commit comments

Comments
 (0)