1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Extract out virtual serial (#3998)

* Extract old virtual serial for compatability

* Update src/js/virtualSerial.js

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

---------

Co-authored-by: nerdCopter <56646290+nerdCopter@users.noreply.github.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
This commit is contained in:
Tomas Chmelevskij 2024-07-10 21:21:49 +02:00 committed by GitHub
parent dc1e86262e
commit 3cffa09ae3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 73 additions and 689 deletions

View file

@ -130,8 +130,9 @@ function connectDisconnect() {
// Hack to get virtual working on the web
serial = serialShim();
serial.connect('virtual', {}, onOpenVirtual);
serial.connect(onOpenVirtual);
} else {
CONFIGURATOR.virtualMode = false;
serial = serialShim();
// Explicitly disconnect the event listeners before attaching the new ones.
serial.removeEventListener('connect', connectHandler);