diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2885be15..437c0084 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1686,6 +1686,12 @@ "pidTuningAngle": { "message": "Angle" }, + "pidTuningLevelAngleLimit": { + "message": "Angle Limit" + }, + "pidTuningLevelSensitivity": { + "message": "Sensitivity" + }, "pidTuningLevelHelp": { "message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation." }, diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 3be0d8b2..28a53024 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -210,13 +210,6 @@
- - - - - - -
+
@@ -226,6 +219,15 @@
+ + + + + + +
+ @@ -239,6 +241,20 @@
+ + + + + + +
+ + + + + + +
diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 56d09db6..c9bad697 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -263,6 +263,13 @@ TABS.pid_tuning.initialize = function (callback) { } else { $('.pid_filter .gyroNotch2').hide(); } + + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + $('.pid_tuning input[name="angleLimit"]').val(ADVANCED_TUNING.levelAngleLimit); + $('.pid_tuning input[name="sensitivity"]').val(ADVANCED_TUNING.levelSensitivity); + } else { + $('.pid_sensitivity').hide(); + } } function form_to_pid_and_rc() { @@ -369,6 +376,10 @@ TABS.pid_tuning.initialize = function (callback) { } } + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + ADVANCED_TUNING.levelAngleLimit = parseInt($('.pid_tuning input[name="angleLimit"]').val()); + ADVANCED_TUNING.levelSensitivity = parseInt($('.pid_tuning input[name="sensitivity"]').val()); + } } function showAllPids() { @@ -383,6 +394,7 @@ TABS.pid_tuning.initialize = function (callback) { if (have_sensor(CONFIG.activeSensors, 'acc')) { $('#pid_accel').show(); $('#pid_level').show(); + $('#pid_sensitivity').show(); } var showTitle = false;