File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ int systemAvailable()
5
5
{
6
6
if (printEndpoint == PRINT_ENDPOINT_BLUETOOTH || printEndpoint == PRINT_ENDPOINT_ALL)
7
7
return (bluetoothRxDataAvailable ());
8
+
9
+ // If the CH34x is disconnected (we are listening to LoRa), avoid reading characters from UART0
10
+ // as this will trigger the system menu
11
+ else if (usbSerialIsSelected == false )
12
+ return (0 );
13
+
8
14
return (Serial.available ());
9
15
}
10
16
@@ -25,7 +31,10 @@ void systemWrite(const uint8_t *buffer, uint16_t length)
25
31
26
32
// Output data to USB serial if necessary
27
33
if ((printEndpoint != PRINT_ENDPOINT_BLUETOOTH) && (!forwardGnssDataToUsbSerial))
28
- Serial.write (buffer, length);
34
+ {
35
+ if (usbSerialIsSelected == true ) // Only use UART0 if we have the mux on the ESP's UART pointed at the CH34x
36
+ Serial.write (buffer, length);
37
+ }
29
38
}
30
39
31
40
// Forward GNSS data to the USB serial port
You can’t perform that action at this time.
0 commit comments