Enable flashing using USB-DFU protocol

For new boards like Tornado
10.3.x-maintenance
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" "message": "Optional USB Permissions"
}, },
"default_optional_permissions_text": { "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": { "default_request_optional_permissions": {
"message": "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 bytes_flashed_total = 0; // used for progress bar
var wBlockNum = 2; // required by DFU var wBlockNum = 2; // required by DFU
// start
self.loadAddress(address, write);
var write = function () { var write = function () {
if (bytes_flashed < self.hex.data[flashing_block].bytes) { 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); 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; break;
case 5: case 5:
// verify // verify

View File

@ -10,7 +10,7 @@ TABS.landing.initialize = function (callback) {
} }
$('#content').load("./tabs/landing.html", function () { $('#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 // translate to user-selected language
localize(); localize();