1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 04:45:18 +03:00

Add support for manual baud rate selection to firmware flasher.

This commit is contained in:
Dominic Clifton 2015-05-22 02:19:51 +01:00
parent 5471ab7f65
commit 3086a98828
5 changed files with 61 additions and 31 deletions

View file

@ -60,8 +60,7 @@ STM32_protocol.prototype.connect = function (port, baud, hex, options, callback)
self.options = {
no_reboot: false,
reboot_baud: false,
erase_chip: false,
flash_slowly: false
erase_chip: false
};
if (options.no_reboot) {
@ -74,11 +73,6 @@ STM32_protocol.prototype.connect = function (port, baud, hex, options, callback)
self.options.erase_chip = true;
}
if (options.flash_slowly) {
self.options.flash_slowly = true;
self.baud = 115200;
}
if (self.options.no_reboot) {
serial.connect(port, {bitrate: self.baud, parityBit: 'even', stopBits: 'one'}, function (openInfo) {
if (openInfo) {