1
0
Fork 0
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:
cTn 2013-12-04 18:13:05 +01:00
parent a1610a0d0e
commit 71677c2b68

View file

@ -55,16 +55,18 @@ STM32_protocol.prototype.connect = function() {
var baud = parseInt($('div#port-picker #baud').val()); var baud = parseInt($('div#port-picker #baud').val());
if (selected_port != '0') { 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) { switch (GUI.operating_system) {
case 'Windows': case 'Windows':
var flashing_bitrate = 921600; var flashing_bitrate = 256000;
break; break;
case 'MacOS': case 'MacOS':
case 'ChromeOS': case 'ChromeOS':
case 'Linux': case 'Linux':
case 'UNIX': case 'UNIX':
var flashing_bitrate = 576000; var flashing_bitrate = 230400;
break; break;
default: default:
@ -76,7 +78,7 @@ STM32_protocol.prototype.connect = function() {
connectionId = openInfo.connectionId; connectionId = openInfo.connectionId;
if (connectionId != -1) { 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'); console.log('Sending ascii "R" to reboot');
// we are connected, disabling connect button in the UI // we are connected, disabling connect button in the UI
@ -93,7 +95,7 @@ STM32_protocol.prototype.connect = function() {
connectionId = openInfo.connectionId; connectionId = openInfo.connectionId;
if (connectionId != -1) { if (connectionId != -1) {
console.log('Connection was opened with ID: ' + connectionId); console.log('Connection was opened with ID: ' + connectionId + ' Baud: ' + flashing_bitrate);
self.initialize(); self.initialize();
} }