Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/js/tabs/pid_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,10 @@ TABS.pid_tuning.initialize = function (callback) {
if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_39)) {
filterTypeValues.push("FIR");
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
filterTypeValues.push("PT2");
filterTypeValues.push("PT3");
}
Comment on lines +1397 to +1400
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I like more this way or only with one push...

Suggested change
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
filterTypeValues.push("PT2");
filterTypeValues.push("PT3");
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
filterTypeValues.push("PT2", "PT3");
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, but maybe i like the first way to best visual differentation betwen two filters type. Do you think that with a single push the performance will be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too sure what I prefer, only was a comment 🙃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the former as it's easier to understand 🙃

return filterTypeValues;
}

Expand Down