mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 01:05:15 +03:00
initial support for receiver data viewing
This commit is contained in:
parent
d61df6fc82
commit
c7f88dcdc4
5 changed files with 39 additions and 6 deletions
18
js/main.js
18
js/main.js
|
@ -1,3 +1,5 @@
|
|||
var timers = new Array();
|
||||
|
||||
$(document).ready(function() {
|
||||
var tabs = $('#tabs > ul');
|
||||
$('a', tabs).click(function() {
|
||||
|
@ -6,6 +8,9 @@ $(document).ready(function() {
|
|||
return;
|
||||
}
|
||||
|
||||
// Disable any active "data pulling" timer
|
||||
disable_timers();
|
||||
|
||||
// Disable previous active button
|
||||
$('li', tabs).removeClass('active');
|
||||
|
||||
|
@ -16,7 +21,18 @@ $(document).ready(function() {
|
|||
$('#content').load("./tabs/initial_setup.html", tab_initialize_initial_setup);
|
||||
} else if ($(this).parent().hasClass('tab_pid_tuning')) {
|
||||
$('#content').load("./tabs/pid_tuning.html", tab_initialize_pid_tuning);
|
||||
} else if ($(this).parent().hasClass('tab_receiver')) {
|
||||
$('#content').load("./tabs/receiver.html", tab_initialize_receiver);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function disable_timers() {
|
||||
for (var i = 0; i < timers.length; i++) {
|
||||
clearInterval(timers[i]);
|
||||
}
|
||||
|
||||
// kill all the refferences
|
||||
timers = [];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue