1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

adding support for baseflights "R" bootloader jump

This commit is contained in:
cTn 2013-11-13 10:25:08 +01:00
parent d3cd348ac3
commit 0f2c2f2a1d

View file

@ -111,7 +111,11 @@ STM32_protocol.prototype.initialize = function() {
this.hex_to_flash.shift();
// first step
self.upload_procedure(1);
if ($('input.updating').is(':checked')) {
self.upload_procedure(0);
} else {
self.upload_procedure(1);
}
};
// no input parameters
@ -236,6 +240,15 @@ STM32_protocol.prototype.upload_procedure = function(step) {
self.steps_executed++;
switch (step) {
case 0:
// reboot into bootloader mode
console.log('STM32 - Trying to jump into bootloader mode');
self.send([0x52]);
GUI.timeout_add('reboot_into_bootloader', function() {
self.upload_procedure(1);
}, 100);
break;
case 1:
// initialize serial interface on the MCU side, auto baud rate settings
self.send([0x7F], 1, function(reply) {