mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 06:45:12 +03:00
Fix out of bound errors pid_tuning
This commit is contained in:
parent
0f8a2911d9
commit
88aa7e1b05
1 changed files with 6 additions and 6 deletions
|
@ -1325,12 +1325,12 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a name to each row of PIDs if empty
|
// Add a name to each row of PIDs if empty
|
||||||
$('.pid_tuning tr').each(function(){
|
$('.pid_tuning tr').each(function() {
|
||||||
for (let i = 0; i <= FC.PID_NAMES.length; i++) {
|
for (const pidName of FC.PID_NAMES) {
|
||||||
if ($(this).hasClass(FC.PID_NAMES[i])) {
|
if ($(this).hasClass(pidName)) {
|
||||||
const firstColumn = $(this).find('td:first');
|
const firstColumn = $(this).find('td:first');
|
||||||
if (!firstColumn.text()) {
|
if (!firstColumn.text()) {
|
||||||
firstColumn.text(FC.PID_NAMES[i]);
|
firstColumn.text(pidName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2412,8 +2412,8 @@ TABS.pid_tuning.updateRatesLabels = function() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// then display them on the chart
|
// then display them on the chart
|
||||||
for (let i = 0; i <= balloons.length; i++) {
|
for (const balloon of balloons) {
|
||||||
balloons[i].balloon();
|
balloon.balloon();
|
||||||
}
|
}
|
||||||
|
|
||||||
stickContext.restore();
|
stickContext.restore();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue