mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
adding support for baseflights "R" bootloader jump
This commit is contained in:
parent
d3cd348ac3
commit
0f2c2f2a1d
1 changed files with 14 additions and 1 deletions
15
js/stm32.js
15
js/stm32.js
|
@ -111,7 +111,11 @@ STM32_protocol.prototype.initialize = function() {
|
||||||
this.hex_to_flash.shift();
|
this.hex_to_flash.shift();
|
||||||
|
|
||||||
// first step
|
// first step
|
||||||
self.upload_procedure(1);
|
if ($('input.updating').is(':checked')) {
|
||||||
|
self.upload_procedure(0);
|
||||||
|
} else {
|
||||||
|
self.upload_procedure(1);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// no input parameters
|
// no input parameters
|
||||||
|
@ -236,6 +240,15 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
||||||
self.steps_executed++;
|
self.steps_executed++;
|
||||||
|
|
||||||
switch (step) {
|
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:
|
case 1:
|
||||||
// initialize serial interface on the MCU side, auto baud rate settings
|
// initialize serial interface on the MCU side, auto baud rate settings
|
||||||
self.send([0x7F], 1, function(reply) {
|
self.send([0x7F], 1, function(reply) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue