@@ -106,39 +106,6 @@ void menuSystem()
106106 Serial.print (macAddress);
107107 Serial.print (F (" ): " ));
108108
109- // Verify the ESP UART2 can communicate TX/RX to ZED UART1
110- if (online.gnss == true )
111- {
112- if (zedUartPassed == false )
113- {
114- // stopUART2Tasks(); //Stop absoring ZED serial via task
115-
116- theGNSS.setSerialRate (460800 , COM_PORT_UART1); // Defaults to 460800 to maximize message output support
117- serialGNSS.begin (460800 ); // UART2 on pins 16/17 for SPP. The ZED-F9P will be configured to output NMEA over its UART1 at the same rate.
118-
119- SFE_UBLOX_GNSS myGNSS;
120- if (myGNSS.begin (serialGNSS) == true ) // begin() attempts 3 connections
121- {
122- zedUartPassed = true ;
123- Serial.print (F (" Online" ));
124- }
125- else
126- Serial.print (F (" Offline" ));
127-
128- theGNSS.setSerialRate (settings.dataPortBaud , COM_PORT_UART1); // Defaults to 460800 to maximize message output support
129- serialGNSS.begin (settings.dataPortBaud ); // UART2 on pins 16/17 for SPP. The ZED-F9P will be configured to output NMEA over its UART1 at the same rate.
130-
131- // startUART2Tasks(); //Return to normal operation
132- }
133- else
134- Serial.print (F (" Online" ));
135- }
136- else
137- {
138- Serial.print (" Can't check (GNSS offline)" );
139- }
140- Serial.println ();
141-
142109 Serial.println (F (" s) Scan I2C" ));
143110 Serial.println (F (" S) Verbose scan of I2C" ));
144111 Serial.println (F (" t) Toggle pin" ));
@@ -298,3 +265,40 @@ void printCurrentConditions()
298265 Serial.println ();
299266 }
300267}
268+
269+ void testGNSS ()
270+ {
271+ // The following ZED test blocks the usage of UART1 for bootloading.
272+ // Verify the ESP UART2 can communicate TX/RX to ZED UART1
273+ if (online.gnss == true )
274+ {
275+ if (zedUartPassed == false )
276+ {
277+ // stopUART2Tasks(); //Stop absoring ZED serial via task
278+
279+ theGNSS.setSerialRate (460800 , COM_PORT_UART1); // Defaults to 460800 to maximize message output support
280+ serialGNSS.begin (460800 ); // UART2 on pins 16/17 for SPP. The ZED-F9P will be configured to output NMEA over its UART1 at the same rate.
281+
282+ SFE_UBLOX_GNSS myGNSS;
283+ if (myGNSS.begin (serialGNSS) == true ) // begin() attempts 3 connections
284+ {
285+ zedUartPassed = true ;
286+ Serial.print (F (" Online" ));
287+ }
288+ else
289+ Serial.print (F (" Offline" ));
290+
291+ theGNSS.setSerialRate (settings.dataPortBaud , COM_PORT_UART1); // Defaults to 460800 to maximize message output support
292+ serialGNSS.begin (settings.dataPortBaud ); // UART2 on pins 16/17 for SPP. The ZED-F9P will be configured to output NMEA over its UART1 at the same rate.
293+
294+ // startUART2Tasks(); //Return to normal operation
295+ }
296+ else
297+ Serial.print (F (" Online" ));
298+ }
299+ else
300+ {
301+ Serial.print (" Can't check (GNSS offline)" );
302+ }
303+ Serial.println ();
304+ }
0 commit comments