1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 08:45:28 +03:00

drop junk in input buffer before entering CLI

this could use some polishing but i think it will do for now
close #21
This commit is contained in:
cTn 2014-01-22 20:51:12 +01:00
parent c0937ddbd4
commit 39075c06ab
3 changed files with 42 additions and 32 deletions

View file

@ -228,7 +228,8 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
// 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;
CLI_active = false;
CLI_valid = false;
if (callback) callback();
}, 5000); // if we dont allow enough time to reboot, CRC of "first" command sent will fail, keep an eye for this one

View file

@ -1,5 +1,6 @@
var configuration_received = false;
var CLI_active = false;
var CLI_valid = false;
var CONFIG = {
version: 0,