1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00
This commit is contained in:
skaman82 2015-11-02 22:07:37 +01:00
parent 278e25a872
commit 06f643812d
30 changed files with 1280 additions and 1143 deletions

View file

@ -3,12 +3,19 @@
$(document).ready(function () {
GUI.updateManualPortVisibility = function(){
if ($('div#port-picker #port option:selected').data().isManual) {
var selected_port = $('div#port-picker #port option:selected');
if (selected_port.data().isManual) {
$('#port-override-option').show();
}
else {
$('#port-override-option').hide();
}
if (selected_port.data().isDFU) {
$('select#baud').hide();
}
else {
$('select#baud').show();
}
};
GUI.updateManualPortVisibility();
@ -33,8 +40,10 @@ $(document).ready(function () {
var selected_port = $('div#port-picker #port option:selected').data().isManual ?
$('#port-override').val() :
String($('div#port-picker #port').val());
if (selected_port != '0' && selected_port != 'DFU') {
if (selected_port === 'DFU') {
GUI.log(chrome.i18n.getMessage('dfu_connect_message'));
}
else if (selected_port != '0') {
if (!clicks) {
console.log('Connecting to: ' + selected_port);
GUI.connecting_to = selected_port;