mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
bugfixes
This commit is contained in:
parent
1722ac5c18
commit
ade74446b3
1 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,9 @@ GUI_control.prototype.timeout_add = function(name, code, timeout) {
|
|||
var timer = setTimeout(function() {
|
||||
code(); // execute code
|
||||
|
||||
self.timeout_remove(name); // cleanup
|
||||
// remove object from array
|
||||
var index = self.timeout_array.indexOf(data);
|
||||
if (index > -1) self.timeout_array.splice(index, 1);
|
||||
}, timeout);
|
||||
|
||||
this.timeout_array.push({'name': name, 'timer': timer, 'timeout': timeout}); // push to primary timeout array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue