fix(usb): use usbPlugged() to detect disconnect

`cdcConnected` is updated from the UI task and cannot be used here.

Fixes #4740
This commit is contained in:
raphaelcoeffic
2024-03-30 10:16:40 +11:00
committed by Peter Feerick
parent 06c09579fd
commit 2d4c1acbfb
+1 -1
View File
@@ -1134,7 +1134,7 @@ int cliSerialPassthrough(const char **argv)
cliReceiveCallBack = spInternalModuleTx;
// loop until cable disconnected
while (cdcConnected) {
while (usbPlugged()) {
uint32_t cli_br = cliGetBaudRate();
if (cli_br && (cli_br != (uint32_t)baudrate)) {