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:
Pawel Spychalski (DzikuVx) 2017-01-23 20:15:48 +01:00
parent 8290f8c34d
commit dc40b96238
2 changed files with 11 additions and 1 deletions

View file

@ -70,13 +70,20 @@ PortHandler.check = function () {
if (port == result.last_used_port) {
console.log('Selecting last used port: ' + result.last_used_port);
$('div#port-picker #port').val(result.last_used_port);
$('#port').val(result.last_used_port);
}
});
} else {
console.log('Last used port wasn\'t saved "yet", auto-select disabled.');
}
});
chrome.storage.local.get('last_used_bps', function (result) {
if (result['last_used_bps']) {
$('#baud').val(result['last_used_bps']);
}
});
}
if (!self.initial_ports) {

View file

@ -228,6 +228,9 @@ function onOpen(openInfo) {
}
});
chrome.storage.local.set({last_used_bps: serial.bitrate});
chrome.storage.local.set({wireless_mode_enabled: $('#wireless-mode').is(":checked")});
serial.onReceive.addListener(read_serial);
// disconnect after 10 seconds with error if we don't get IDENT data