mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 03:19:54 +03:00
bps save
This commit is contained in:
parent
8290f8c34d
commit
dc40b96238
2 changed files with 11 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue