Skip to content

Commit a3675ab

Browse files
committed
Improve UART test reliability
1 parent 9314df2 commit a3675ab

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,13 @@ void paintSystemTest()
14511451
//Verify the ESP UART2 can communicate TX/RX to ZED UART1
14521452
if (zedUartPassed == false)
14531453
{
1454+
setMuxport(MUX_UBLOX_NMEA); //Set mux to UART so we can debug over data port
1455+
delay(20);
1456+
1457+
//Clear out buffer before starting
1458+
while(serialGNSS.available()) serialGNSS.read();
1459+
serialGNSS.flush();
1460+
14541461
SFE_UBLOX_GNSS myGNSS;
14551462

14561463
//begin() attempts 3 connections

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,14 @@ void setup()
362362
Wire.begin(); //Start I2C on core 1
363363
Wire.setClock(400000);
364364

365-
beginGNSS(); //Connect to GNSS
365+
beginGNSS(); //Connect to GNSS to get module type
366366

367-
beginEEPROM(); //Start EEPROM and SD for settings
367+
beginEEPROM(); //Start EEPROM for settings
368368
//eepromErase(); //Must be before first use of EEPROM. Currently in beginBoard().
369369

370-
beginBoard(); //Determine what hardware platform we are running on
370+
beginBoard(); //Determine what hardware platform we are running on and check on button
371371

372-
beginDisplay(); //Check if an external Qwiic OLED is attached
372+
beginDisplay(); //Start display first to be able to display any errors
373373

374374
beginLEDs(); //LED and PWM setup
375375

0 commit comments

Comments
 (0)