@@ -67,8 +67,9 @@ void setup()
6767 lcd.setCursor (0 , 1 );
6868 lcd.print (" GPS Detected" );
6969
70- myGPS.setI2COutput (COM_TYPE_UBX); // Set the I2C port to output UBX only (turn off NMEA noise)
71- myGPS.saveConfiguration (); // Save the current settings to flash and BBR
70+ // myGPS.setI2COutput(COM_TYPE_RTCM3); //Set the I2C port to output RTCM3 sentences (turn off NMEA noise)
71+ myGPS.setI2COutput (COM_TYPE_UBX); // Set the I2C port to output UBX sentences (turn off NMEA noise)
72+ myGPS.saveConfiguration (); // Save the current settings to flash and BBR
7273
7374 boolean response = true ;
7475 response &= myGPS.enableRTCMmessage (UBX_RTCM_1005, COM_PORT_I2C, 1 ); // Enable message 1005 to output through I2C port, message every second
@@ -83,7 +84,7 @@ void setup()
8384 }
8485 else
8586 {
86- Serial.println (F (" RTCM failed to enable. Are you sure you have an NEO-M8P? " ));
87+ Serial.println (F (" RTCM failed to enable. Are you sure you have an ZED-F9P? Freezing. " ));
8788 while (1 )
8889 ; // Freeze
8990 }
@@ -92,7 +93,7 @@ void setup()
9293 response = myGPS.getSurveyStatus (2000 ); // Query module for SVIN status with 2000ms timeout (request can take a long time)
9394 if (response == false )
9495 {
95- Serial.println (F (" Failed to get Survey In status" ));
96+ Serial.println (F (" Failed to get Survey In status. Freezing. " ));
9697 while (1 )
9798 ; // Freeze
9899 }
@@ -111,7 +112,7 @@ void setup()
111112 {
112113 Serial.println (F (" Survey start failed" ));
113114 lcd.setCursor (0 , 3 );
114- lcd.print (F (" Survey start failed" ));
115+ lcd.print (F (" Survey start failed. Freezing. " ));
115116 while (1 )
116117 ;
117118 }
@@ -170,13 +171,16 @@ void setup()
170171 Serial.println (F (" Base survey complete! RTCM now broadcasting." ));
171172 lcd.clear ();
172173 lcd.print (F (" Transmitting RTCM" ));
174+
175+ myGPS.setI2COutput (COM_TYPE_UBX | COM_TYPE_RTCM3); // Set the I2C port to output UBX and RTCM sentences (not really an option, turns on NMEA as well)
176+
173177}
174178
175179void loop ()
176180{
177181 myGPS.checkUblox (); // See if new data is available. Process bytes as they come in.
178182
179- // Do anything you want. Call checkUblox() every second. NEO-M8P-2 has TX buffer of 4k bytes.
183+ // Do anything you want. Call checkUblox() every second. ZED-F9P has TX buffer of 4k bytes.
180184
181185 delay (250 ); // Don't pound too hard on the I2C bus
182186}
0 commit comments