mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
AT32 MCU DFU added
This commit is contained in:
parent
5a6c2d7040
commit
cf35bd6142
5 changed files with 17 additions and 6 deletions
|
@ -1,7 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var usbDevices = {
|
||||
STM32DFU: {'vendorId': 1155, 'productId': 57105}
|
||||
filters: [
|
||||
{'vendorId': 1155, 'productId': 57105},
|
||||
{'vendorId': 11836, 'productId': 57105}
|
||||
]
|
||||
};
|
||||
|
||||
var PortHandler = new function () {
|
||||
|
@ -152,7 +155,7 @@ PortHandler.check = function () {
|
|||
};
|
||||
|
||||
PortHandler.check_usb_devices = function (callback) {
|
||||
chrome.usb.getDevices(usbDevices.STM32DFU, function (result) {
|
||||
chrome.usb.getDevices(usbDevices, function (result) {
|
||||
if (result.length) {
|
||||
if (!$("div#port-picker #port [value='DFU']").length) {
|
||||
$('div#port-picker #port').append($('<option/>', {value: "DFU", text: "DFU", data: {isDFU: true}}));
|
||||
|
@ -166,7 +169,7 @@ PortHandler.check_usb_devices = function (callback) {
|
|||
self.dfu_available = false;
|
||||
}
|
||||
|
||||
if(callback) callback(self.dfu_available);
|
||||
if (callback) callback(self.dfu_available);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue