mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
reverse last speed change for compatibility
This commit is contained in:
parent
a1610a0d0e
commit
71677c2b68
1 changed files with 7 additions and 5 deletions
12
js/stm32.js
12
js/stm32.js
|
@ -55,16 +55,18 @@ STM32_protocol.prototype.connect = function() {
|
|||
var baud = parseInt($('div#port-picker #baud').val());
|
||||
|
||||
if (selected_port != '0') {
|
||||
// get fastest supported bitrate for current platform (serial API for windows support baud > 115200 from chrome v 33+)
|
||||
// get fastest supported bitrate for current platform
|
||||
// (serial API for windows support baud > 256000 from chrome v 33+)
|
||||
// recommended windows - 921600, rest - 576000, default - 115200
|
||||
switch (GUI.operating_system) {
|
||||
case 'Windows':
|
||||
var flashing_bitrate = 921600;
|
||||
var flashing_bitrate = 256000;
|
||||
break;
|
||||
case 'MacOS':
|
||||
case 'ChromeOS':
|
||||
case 'Linux':
|
||||
case 'UNIX':
|
||||
var flashing_bitrate = 576000;
|
||||
var flashing_bitrate = 230400;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -76,7 +78,7 @@ STM32_protocol.prototype.connect = function() {
|
|||
connectionId = openInfo.connectionId;
|
||||
|
||||
if (connectionId != -1) {
|
||||
console.log('Connection was opened with ID: ' + connectionId);
|
||||
console.log('Connection was opened with ID: ' + connectionId + ' Baud: ' + baud);
|
||||
console.log('Sending ascii "R" to reboot');
|
||||
|
||||
// we are connected, disabling connect button in the UI
|
||||
|
@ -93,7 +95,7 @@ STM32_protocol.prototype.connect = function() {
|
|||
connectionId = openInfo.connectionId;
|
||||
|
||||
if (connectionId != -1) {
|
||||
console.log('Connection was opened with ID: ' + connectionId);
|
||||
console.log('Connection was opened with ID: ' + connectionId + ' Baud: ' + flashing_bitrate);
|
||||
|
||||
self.initialize();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue