Skip to content

Commit 6736b08

Browse files
committed
Move GNSS to Serial output to Ports menu
1 parent 6414616 commit 6736b08

File tree

3 files changed

+43
-24
lines changed

3 files changed

+43
-24
lines changed

Firmware/RTK_Everywhere/menuMain.ino

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ void menuMain()
155155

156156
systemPrintln("3) Configure Base");
157157

158-
if (productVariant != RTK_TORCH) // Torch does not have external ports
159-
systemPrintln("4) Configure Ports");
158+
systemPrintln("4) Configure Ports");
160159

161160
if (productVariant != RTK_TORCH) // Torch does not have logging
162161
systemPrintln("5) Configure Logging");
@@ -217,7 +216,7 @@ void menuMain()
217216
gnssMenuMessages();
218217
else if (incoming == 3)
219218
menuBase();
220-
else if (incoming == 4 && productVariant != RTK_TORCH) // Torch does not have external ports
219+
else if (incoming == 4)
221220
menuPorts();
222221
else if (incoming == 5 && productVariant != RTK_TORCH) // Torch does not have logging
223222
menuLog();

Firmware/RTK_Everywhere/menuPorts.ino

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
11
void menuPorts()
22
{
33
if (present.portDataMux == true)
4+
{
5+
//RTK Facet mosaic, Facet v2
46
menuPortsMultiplexed();
7+
}
8+
else if (productVariant == RTK_TORCH)
9+
{
10+
//RTK Torch
11+
menuPortsUsb();
12+
}
513
else
14+
{
15+
//RTK EVK
616
menuPortsNoMux();
17+
}
18+
}
19+
20+
// Configure a single port interface (USB only)
21+
void menuPortsUsb()
22+
{
23+
while (1)
24+
{
25+
systemPrintln();
26+
systemPrintln("Menu: Ports");
27+
28+
systemPrintf("1) Output GNSS data to USB serial: %s\r\n", settings.enableGnssToUsbSerial ? "Enabled" : "Disabled");
29+
30+
systemPrintln("x) Exit");
31+
32+
int incoming = getUserInputNumber(); // Returns EXIT, TIMEOUT, or long
33+
34+
if (incoming == 1)
35+
settings.enableGnssToUsbSerial ^= 1;
36+
37+
else if (incoming == 'x')
38+
break;
39+
else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
40+
break;
41+
else if (incoming == INPUT_RESPONSE_GETNUMBER_TIMEOUT)
42+
break;
43+
else
44+
printUnknown(incoming);
45+
}
46+
47+
clearBuffer(); // Empty buffer of any newline chars
748
}
849

950
// Set the baud rates for the radio and data ports

Firmware/RTK_Everywhere/menuSystem.ino

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ void menuSystem()
156156
systemPrintf("Filtered by parser: %d NMEA / %d RTCM / %d UBX\r\n", failedParserMessages_NMEA,
157157
failedParserMessages_RTCM, failedParserMessages_UBX);
158158

159-
// Display the USB serial output status
160-
menuSystemDisplayUsbSerialOutput(settings.enableGnssToUsbSerial);
161-
162159
//---------------------------
163160
// Start of menu
164161
//---------------------------
@@ -949,9 +946,6 @@ void menuOperation()
949946
if(present.gnss_zedf9p)
950947
systemPrintln("10) Mirror ZED-F9x's UART1 settings to USB");
951948

952-
// USB Serial
953-
systemPrintln("11) Output GNSS data to USB serial");
954-
955949
systemPrintln("---- Interrupts ----");
956950
systemPrint("30) Bluetooth Interrupts Core: ");
957951
systemPrintln(settings.bluetoothInterruptsCore);
@@ -1053,12 +1047,6 @@ void menuOperation()
10531047
systemPrintln(F("USB messages successfully enabled"));
10541048
}
10551049

1056-
else if (incoming == 11)
1057-
{
1058-
settings.enableGnssToUsbSerial ^= 1;
1059-
menuSystemDisplayUsbSerialOutput(settings.enableGnssToUsbSerial);
1060-
}
1061-
10621050
else if (incoming == 30)
10631051
{
10641052
getNewSetting("Not yet implemented! - Enter Core used for Bluetooth Interrupts", 0, 1,
@@ -1111,15 +1099,6 @@ void menuOperation()
11111099
clearBuffer(); // Empty buffer of any newline chars
11121100
}
11131101

1114-
// Display the USB serial output
1115-
void menuSystemDisplayUsbSerialOutput(bool gnssData)
1116-
{
1117-
if (gnssData)
1118-
systemPrintln("USB Serial output is GNSS data");
1119-
else
1120-
systemPrintln("USB Serial output is status and debug messages");
1121-
}
1122-
11231102
// Toggle periodic print message enables
11241103
void menuPeriodicPrint()
11251104
{

0 commit comments

Comments
 (0)