Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/main/io/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,16 @@ void serialPassthrough(serialPort_t *left, serialPort_t *right, serialConsumer
LED1_OFF;

#ifdef USE_VCP
// Track current encoding applied to right port for VCP mirroring
portOptions_t currentOptions = right->options;
uint32_t currentBaudRate = right->baudRate;
// Track current encoding applied to right port for VCP mirroring.
// Baseline from the HOST's line coding at passthrough entry, not from the
// right port's settings: the mirror must only react to host-side CHANGES
// during the session. Initializing from right->baudRate/options would make
// the first mirror tick rewrite the passthrough UART's explicitly-requested
// encoding (e.g. CLI `serialpassthrough <id> 420000`) with whatever the
// host COM port is currently set to (115200 during the CLI session),
// breaking ELRS/Betaflight passthrough flashing (issue #11783).
portOptions_t currentOptions = usbVcpGetLineCoding();
uint32_t currentBaudRate = usbVcpGetBaudRate(left);
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
bool leftIsVcp = (left->identifier == SERIAL_PORT_USB_VCP);
uint32_t lastMirrorTime = 0;
#endif
Expand Down
Loading