polishing bitrate selector
parent
fcdcccdc1f
commit
36960513e3
|
@ -55,19 +55,19 @@ 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') {
|
||||||
// calculate fastest bitrate speed for current OS
|
// get fastest supported bitrate for current platform
|
||||||
switch (GUI.operating_system) {
|
switch (GUI.operating_system) {
|
||||||
case 'Windows':
|
case 'Windows':
|
||||||
var flashing_bitrate = 256000;
|
var flashing_bitrate = 256000;
|
||||||
break;
|
break;
|
||||||
case 'MacOS':
|
case 'MacOS':
|
||||||
var flashing_bitrate = 230400;
|
|
||||||
break;
|
|
||||||
case 'ChromeOS':
|
case 'ChromeOS':
|
||||||
case 'Linux':
|
case 'Linux':
|
||||||
case 'UNIX':
|
case 'UNIX':
|
||||||
var flashing_bitrate = 230400;
|
var flashing_bitrate = 230400;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
var flashing_bitrate = 115200;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$('input.updating').is(':checked')) {
|
if (!$('input.updating').is(':checked')) {
|
||||||
|
@ -111,7 +111,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);
|
||||||
|
|
||||||
// we are connected, disabling connect button in the UI
|
// we are connected, disabling connect button in the UI
|
||||||
GUI.connect_lock = true;
|
GUI.connect_lock = true;
|
||||||
|
|
Loading…
Reference in New Issue