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:
committed by
Peter Feerick
parent
06c09579fd
commit
2d4c1acbfb
+1
-1
@@ -1134,7 +1134,7 @@ int cliSerialPassthrough(const char **argv)
|
|||||||
cliReceiveCallBack = spInternalModuleTx;
|
cliReceiveCallBack = spInternalModuleTx;
|
||||||
|
|
||||||
// loop until cable disconnected
|
// loop until cable disconnected
|
||||||
while (cdcConnected) {
|
while (usbPlugged()) {
|
||||||
|
|
||||||
uint32_t cli_br = cliGetBaudRate();
|
uint32_t cli_br = cliGetBaudRate();
|
||||||
if (cli_br && (cli_br != (uint32_t)baudrate)) {
|
if (cli_br && (cli_br != (uint32_t)baudrate)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user