1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 12:55:13 +03:00

Enable flashing using USB-DFU protocol

For new boards like Tornado
This commit is contained in:
Michael Corcoran 2015-10-03 20:35:38 +13:00
parent 7bf70092d3
commit 8b029edbcf
3 changed files with 7 additions and 6 deletions

View file

@ -205,7 +205,7 @@
"message": "Optional USB Permissions"
},
"default_optional_permissions_text": {
"message": "Due to addition of <strong>Naze32PRO</strong> to the supported hardware family, Configurator <strong style=\"color: red\">requires</strong> USB access to allow firmware flashing via DFU"
"message": "To allow flashing some newer flight controllers, Configurator <strong style=\"color: red\">requires</strong> USB access"
},
"default_request_optional_permissions": {
"message": "Request Optional Permissions"

View file

@ -296,9 +296,6 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
var bytes_flashed_total = 0; // used for progress bar
var wBlockNum = 2; // required by DFU
// start
self.loadAddress(address, write);
var write = function () {
if (bytes_flashed < self.hex.data[flashing_block].bytes) {
var bytes_to_write = ((bytes_flashed + 2048) <= self.hex.data[flashing_block].bytes) ? 2048 : (self.hex.data[flashing_block].bytes - bytes_flashed);
@ -353,6 +350,10 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
}
}
}
// start
self.loadAddress(address, write);
break;
case 5:
// verify

View file

@ -10,7 +10,7 @@ TABS.landing.initialize = function (callback) {
}
$('#content').load("./tabs/landing.html", function () {
//check_usb_permissions(); // temporary enabled in dev branch, should be commented out untill DFU support goes live
check_usb_permissions(); // check for permissions require for USB DFU support
// translate to user-selected language
localize();