Skip to content

Commit 4ec6f58

Browse files
authored
Fix TPA breakpoint range (#4558)
1 parent 0c51874 commit 4ec6f58

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/tabs/pid_tuning.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import TuningSliders from "../TuningSliders";
1010
import Model from "../model";
1111
import RateCurve from "../RateCurve";
1212
import MSPCodes from "../msp/MSPCodes";
13-
import { API_VERSION_1_45, API_VERSION_1_47 } from "../data_storage";
13+
import { API_VERSION_1_45, API_VERSION_1_46, API_VERSION_1_47 } from "../data_storage";
1414
import { gui_log } from "../gui_log";
1515
import { degToRad, isInt } from "../utils/common";
1616
import semver from "semver";
@@ -914,6 +914,10 @@ pid_tuning.initialize = function (callback) {
914914
FC.RC_TUNING.dynamic_THR_breakpoint = parseInt($('.tpa-old input[name="tpa-breakpoint"]').val());
915915
}
916916

917+
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
918+
$('input[id="tpaBreakpoint"]').attr({ max: 2000, min: 1000 });
919+
}
920+
917921
FC.FILTER_CONFIG.gyro_lowpass_hz = parseInt($('.pid_filter input[name="gyroLowpassFrequency"]').val());
918922
FC.FILTER_CONFIG.dterm_lowpass_hz = parseInt($('.pid_filter input[name="dtermLowpassFrequency"]').val());
919923
FC.FILTER_CONFIG.yaw_lowpass_hz = parseInt($('.pid_filter input[name="yawLowpassFrequency"]').val());

0 commit comments

Comments
 (0)