mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
bugfixes + removing obsolete code
This commit is contained in:
parent
0f23b5f5d9
commit
74323d894f
2 changed files with 18 additions and 41 deletions
23
js/gui.js
23
js/gui.js
|
@ -134,22 +134,19 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
|
|||
bufView[4] = 0x0D; // enter
|
||||
|
||||
chrome.serial.write(connectionId, bufferOut, function(writeInfo) {
|
||||
if (callback) {
|
||||
// we could handle this "nicely", but this will do for now
|
||||
// (another approach is however much more complicated):
|
||||
// we can setup an interval asking for data lets say every 200ms, when data arrives, callback will be triggered and tab switched
|
||||
// we could probably implement this someday
|
||||
GUI.timeout_add('waiting_for_bootup', function() {
|
||||
CLI_active = false;
|
||||
callback();
|
||||
}, 3000);
|
||||
}
|
||||
// we could handle this "nicely", but this will do for now
|
||||
// (another approach is however much more complicated):
|
||||
// we can setup an interval asking for data lets say every 200ms, when data arrives, callback will be triggered and tab switched
|
||||
// we could probably implement this someday
|
||||
GUI.timeout_add('waiting_for_bootup', function() {
|
||||
CLI_active = false;
|
||||
|
||||
if (callback) callback();
|
||||
}, 3000);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
if (callback) callback();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue