Skip to content

Commit d9591db

Browse files
committed
Add debug menu: mirror UART1 to USB
Useful for creating logs to compare against microSD.
1 parent d1deb96 commit d9591db

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ void menuDebug()
333333
Serial.print(F("17) Periodically print CPU idle time: "));
334334
Serial.printf("%s\r\n", settings.enablePrintIdleTime ? "Enabled" : "Disabled");
335335

336+
Serial.println(F("18) Mirror ZED-F9x's UART1 settings to USB"));
337+
336338
Serial.println(F("t) Enter Test Screen"));
337339

338340
Serial.println(F("e) Erase LittleFS"));
@@ -465,6 +467,16 @@ void menuDebug()
465467
{
466468
settings.enablePrintIdleTime ^= 1;
467469
}
470+
else if (incoming == 18)
471+
{
472+
bool response = configureGNSSMessageRates(COM_PORT_USB, settings.ubxMessages); //Make sure the appropriate messages are enabled
473+
response &= i2cGNSS.setPortOutput(COM_PORT_USB, COM_TYPE_NMEA | COM_TYPE_UBX | COM_TYPE_RTCM3); //Duplicate UART1
474+
475+
if (response == false)
476+
Serial.println(F("Failed to enable USB messages"));
477+
else
478+
Serial.println(F("USB messages successfully enabled"));
479+
}
468480
else
469481
printUnknown(incoming);
470482
}

0 commit comments

Comments
 (0)