mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
auto connect bugfixes
This commit is contained in:
parent
219a0dfdfa
commit
7d097a51b6
2 changed files with 8 additions and 4 deletions
|
@ -60,10 +60,14 @@ $(document).ready(function() {
|
|||
chrome.storage.local.get('auto_connect', function(result) {
|
||||
if (typeof result.auto_connect === 'undefined') {
|
||||
// auto_connect wasn't saved yet, save and push true to the GUI
|
||||
chrome.storage.local.set({'auto_connect': true});
|
||||
|
||||
GUI.auto_connect = true;
|
||||
|
||||
$('input.auto_connect').prop('checked', true);
|
||||
$('input.auto_connect, span.auto_connect').prop('title', 'Auto-Connect: Enabled - Configurator automatically tries to connect when new port is detected');
|
||||
$('select#baud').val(115200).prop('disabled', true);
|
||||
|
||||
// save
|
||||
chrome.storage.local.set({'auto_connect': true});
|
||||
} else {
|
||||
if (result.auto_connect) {
|
||||
// enabled by user
|
||||
|
@ -97,7 +101,7 @@ $(document).ready(function() {
|
|||
if (!GUI.connected_to && !GUI.connecting_to) $('select#baud').prop('disabled', false);
|
||||
}
|
||||
|
||||
chrome.storage.local.set({'auto_connect': GUI.auto_connect}, function() {});
|
||||
chrome.storage.local.set({'auto_connect': GUI.auto_connect});
|
||||
});
|
||||
});
|
||||
PortHandler.initialize();
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<li>
|
||||
<a class="connect" href="#" title="">Connect</a>
|
||||
<label>
|
||||
<input class="auto_connect" type="checkbox" title="Auto-Connect" checked="checked"/>
|
||||
<input class="auto_connect" type="checkbox" title="Auto-Connect" />
|
||||
<span class="auto_connect">Auto-Connect</span>
|
||||
</label>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue