mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Added Virtual Mode
This commit is contained in:
parent
09663e386e
commit
030a75a89e
15 changed files with 518 additions and 52 deletions
|
@ -17,6 +17,9 @@ const PortHandler = new function () {
|
|||
PortHandler.initialize = function () {
|
||||
this.portPickerElement = $('div#port-picker #port');
|
||||
|
||||
// fill dropdown with version numbers
|
||||
generateVirtualApiVersions();
|
||||
|
||||
// start listening, check after TIMEOUT_CHECK ms
|
||||
this.check();
|
||||
};
|
||||
|
@ -72,6 +75,12 @@ PortHandler.check_usb_devices = function (callback) {
|
|||
data: {isDFU: true},
|
||||
}));
|
||||
|
||||
self.portPickerElement.append($('<option/>', {
|
||||
value: 'virtual',
|
||||
text: i18n.getMessage('portsSelectVirtual'),
|
||||
data: {isVirtual: true},
|
||||
}));
|
||||
|
||||
self.portPickerElement.append($('<option/>', {
|
||||
value: 'manual',
|
||||
text: i18n.getMessage('portsSelectManual'),
|
||||
|
@ -213,6 +222,12 @@ PortHandler.updatePortSelect = function (ports) {
|
|||
}));
|
||||
}
|
||||
|
||||
this.portPickerElement.append($("<option/>", {
|
||||
value: 'virtual',
|
||||
text: i18n.getMessage('portsSelectVirtual'),
|
||||
data: {isVirtual: true},
|
||||
}));
|
||||
|
||||
this.portPickerElement.append($("<option/>", {
|
||||
value: 'manual',
|
||||
text: i18n.getMessage('portsSelectManual'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue