mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
fixed formatting
This commit is contained in:
parent
e0b97b3b50
commit
db3b50814b
1 changed files with 11 additions and 6 deletions
|
@ -40,7 +40,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS, false, false, get_pid_controller);
|
MSP.send_message(MSP_codes.MSP_STATUS, false, false, get_pid_controller);
|
||||||
|
|
||||||
function pid_and_rc_to_form() {
|
function pid_and_rc_to_form() {
|
||||||
// Fill in the data from PIDs array
|
// Fill in the data from PIDs array
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$('.pid_tuning .ROLL input').each(function () {
|
$('.pid_tuning .ROLL input').each(function () {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
|
@ -178,7 +178,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function form_to_pid_and_rc() {
|
function form_to_pid_and_rc() {
|
||||||
// Catch all the changes and stuff the inside PIDs array
|
// Catch all the changes and stuff the inside PIDs array
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$('table.pid_tuning tr.ROLL input').each(function () {
|
$('table.pid_tuning tr.ROLL input').each(function () {
|
||||||
PIDs[0][i++] = parseFloat($(this).val());
|
PIDs[0][i++] = parseFloat($(this).val());
|
||||||
|
@ -311,11 +311,12 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
// update == save.
|
// update == save.
|
||||||
$('a.update').click(function () {
|
$('a.update').click(function () {
|
||||||
|
|
||||||
form_to_pid_and_rc();
|
form_to_pid_and_rc();
|
||||||
|
|
||||||
function send_pids() {
|
function send_pids() {
|
||||||
if (!TABS.pid_tuning.controllerChanged) MSP.send_message(MSP_codes.MSP_SET_PID, MSP.crunch(MSP_codes.MSP_SET_PID), false, send_rc_tuning_changes);
|
if (!TABS.pid_tuning.controllerChanged) {
|
||||||
|
MSP.send_message(MSP_codes.MSP_SET_PID, MSP.crunch(MSP_codes.MSP_SET_PID), false, send_rc_tuning_changes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_rc_tuning_changes() {
|
function send_rc_tuning_changes() {
|
||||||
|
@ -346,10 +347,14 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TABS.pid_tuning.cleanup = function (callback) {
|
TABS.pid_tuning.cleanup = function (callback) {
|
||||||
if (callback) callback();
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
};
|
};
|
Loading…
Add table
Add a link
Reference in a new issue