1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

adding cleanup routine for new timer code in aux

#12
This commit is contained in:
cTn 2013-12-05 09:55:31 +01:00
parent 607abbd046
commit 5d1a8f7aa1

View file

@ -132,6 +132,11 @@ GUI_control.prototype.timeout_kill_all = function() {
// default switch doesn't require callback to be set
GUI_control.prototype.tab_switch_cleanup = function(callback) {
switch (this.active_tab) {
case 'auxiliary_configuration':
GUI.interval_remove('aux_data_poll');
if (callback) callback();
break;
case 'cli':
var bufferOut = new ArrayBuffer(5);
var bufView = new Uint8Array(bufferOut);
@ -154,6 +159,7 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
}, 5000); // if we dont allow enough time to reboot, CRC of "first" command sent will fail, keep an eye for this one
});
break;
default:
if (callback) callback();
}