Skip to content

Commit

Permalink
fix(usb): use usbPlugged() to detect disconnect
Browse files Browse the repository at this point in the history
`cdcConnected` is updated from the UI task and cannot be used here.

Fixes #4740
  • Loading branch information
raphaelcoeffic authored and 3djc committed Mar 30, 2024
1 parent 417c37c commit 3d490c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radio/src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3d490c4

Please sign in to comment.