diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 02c857fd..045e18c7 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -988,7 +988,7 @@ "message": "Maximum YAW rotation rate that MagHold controller can request from UAV. Used only when MagHold mode is enabled, during RTH and WAYPOINT navigation. Values below 30dps gives nice \"cinematic\" turns" }, "pidTuningTPA": { - "message": "TPA" + "message": "Thrust PID Attenuation (TPA)" }, "pidTuningTPABreakPoint": { "message": "TPA Breakpoint" diff --git a/main.css b/main.css index 17ba4d3e..bfeda581 100644 --- a/main.css +++ b/main.css @@ -1050,6 +1050,15 @@ dialog { margin-bottom: 15px; } +.tab_subtitle { + border-bottom: 1px solid #37a8db; + font-size: 1.5em; + line-height: 1.5em; + height: 25px; + font-family: 'open_sanslight', Arial, serif; + margin-bottom: 8px; +} + /* Note */ .note { background-color: #fff7cd; @@ -2099,15 +2108,17 @@ select { .subtab__header_label { display: inline-block; padding: 0 1em; - background-color: #ccc; + background-color: #eee; min-width: 7em; height: 1.5em; line-height: 1.5em; cursor: pointer; + font-size: 18px; } .subtab__header_label--current { font-weight: bold; + background-color: #ccc; } .subtab__header_label:hover { diff --git a/src/css/tabs/pid_tuning.css b/src/css/tabs/pid_tuning.css index 2123ed54..9cb31bd6 100644 --- a/src/css/tabs/pid_tuning.css +++ b/src/css/tabs/pid_tuning.css @@ -12,7 +12,7 @@ .rate-tpa.rate-tpa--inav td, .rate-tpa.rate-tpa--filtering td, .rate-tpa.rate-tpa--misc td { - background-color: #DEDEDE; + background-color: #f3f3f3; width: auto; border-bottom: 1px solid #ccc; } @@ -376,3 +376,7 @@ top: 10px; position: relative; } + +.rate-tpa tbody { + /* background: #D6D6D6 linear-gradient(-45deg, rgba(255, 255, 255, .2) 10%, transparent 10%, transparent 20%, rgba(255, 255, 255, .2) 20%, rgba(255, 255, 255, .2) 30%, transparent 30%, transparent 40%, rgba(255, 255, 255, .2) 40%, rgba(255, 255, 255, .2) 50%, transparent 50%, transparent 60%, rgba(255, 255, 255, .2) 60%, rgba(255, 255, 255, .2) 70%, transparent 70%, transparent 80%, rgba(255, 255, 255, .2) 80%, rgba(255, 255, 255, .2) 90%, transparent 90%, transparent 100%, rgba(255, 255, 255, .2) 100%, transparent); */ +} diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 5b282ec7..8d96ac2d 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -3,193 +3,223 @@
- PID tuning - Rates + PID gains + Rates & Expo Filters - Fine details + Mechanics
-
- -
-
-
-
- - + -
-
-
-
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - -
-
-
VEL
- - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
+
PID gains
+
+
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
VEL
+ + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
- +
+ + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + +
+ + % +
+
+ +
+
+
-
+
Rates & Expo
+
+
+ + + + + + + + + + + + - - - -
- + degrees per second
- degrees per second
- + degrees per second
Roll & Pitch Expo + +
Yaw Expo + +
@@ -206,44 +236,44 @@
+ degrees per second +
+
- %
- %
- %
- degrees per second -
-
-
+
-
+
@@ -283,8 +313,8 @@
-
-
+
+
@@ -302,6 +332,39 @@
+ + + + + + +
+ + Hz +
+
+
+
+
Static Notch Filters (deprecated)
+
+ + + + + + + + + + - - -
+ Hz +
+
+ Hz +
+
@@ -334,22 +397,6 @@
-
- -
- - - - - - - - - - - - - -
- - Hz -
-
@@ -366,202 +413,110 @@
- Hz -
-
- Hz -
-
-
-
-
- - - - - - - - - - - - - - - -
-
-
- -
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
- -
-
- -
-
-
- - - - - - - - - - - -
- -
-
- -
-
-
- -
- - - - - - - - - - - -
- -
-
- -
-
-
- -
-
-
- - - +
+
+
+
+ + + - - + + -
- -
+
- -
+
-
-
- - - - - - - - - - - - - - - - - - - -
- - dps^2 -
-
- - dps^2 -
-
- - % -
-
- -
-
-
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+
diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 4522d962..dcf24ee6 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -48,15 +48,13 @@ TABS.pid_tuning.initialize = function (callback) { }); // Fill in data from RC_tuning object - $('.rate-tpa input[name="roll-pitch"]').val(RC_tuning.roll_pitch_rate.toFixed(2)); + $('#rate-roll').val(RC_tuning.roll_rate); + $('#rate-pitch').val(RC_tuning.pitch_rate); + $('#rate-yaw').val(RC_tuning.yaw_rate); - $('.rate-tpa input[name="roll"]').val(RC_tuning.roll_rate); - $('.rate-tpa input[name="pitch"]').val(RC_tuning.pitch_rate); - $('.rate-tpa input[name="yaw"]').val(RC_tuning.yaw_rate); - - $('.rate-tpa input[name="manual_roll"]').val(RC_tuning.manual_roll_rate); - $('.rate-tpa input[name="manual_pitch"]').val(RC_tuning.manual_pitch_rate); - $('.rate-tpa input[name="manual_yaw"]').val(RC_tuning.manual_yaw_rate); + $('#rate-manual-roll').val(RC_tuning.manual_roll_rate); + $('#rate-manual-pitch').val(RC_tuning.manual_pitch_rate); + $('#rate-manual-yaw').val(RC_tuning.manual_yaw_rate); $('#tpa').val(RC_tuning.dynamic_THR_PID); $('#tpa-breakpoint').val(RC_tuning.dynamic_THR_breakpoint); @@ -74,16 +72,16 @@ TABS.pid_tuning.initialize = function (callback) { }); // catch RC_tuning changes - RC_tuning.roll_pitch_rate = parseFloat($('.rate-tpa input[name="roll-pitch"]').val()); - RC_tuning.roll_rate = parseFloat($('.rate-tpa input[name="roll"]:visible').val()); - RC_tuning.pitch_rate = parseFloat($('.rate-tpa input[name="pitch"]:visible').val()); - RC_tuning.yaw_rate = parseFloat($('.rate-tpa input[name="yaw"]:visible').val()); + RC_tuning.roll_rate = parseFloat($('#rate-roll').val()); + RC_tuning.pitch_rate = parseFloat($('#rate-pitch').val()); + RC_tuning.yaw_rate = parseFloat($('#rate-yaw').val()); + RC_tuning.dynamic_THR_PID = parseInt($('#tpa').val()); RC_tuning.dynamic_THR_breakpoint = parseInt($('#tpa-breakpoint').val()); - RC_tuning.manual_roll_rate = $('.rate-tpa input[name="manual_roll"]:visible').val(); - RC_tuning.manual_pitch_rate = $('.rate-tpa input[name="manual_pitch"]:visible').val(); - RC_tuning.manual_yaw_rate = $('.rate-tpa input[name="manual_yaw"]:visible').val(); + RC_tuning.manual_roll_rate = $('#rate-manual-roll').val(); + RC_tuning.manual_pitch_rate = $('#rate-manual-pitch').val(); + RC_tuning.manual_yaw_rate = $('#rate-manual-yaw').val(); } function hideUnusedPids(sensors_detected) { $('.tab-pid_tuning table.pid_tuning').hide(); @@ -131,37 +129,21 @@ TABS.pid_tuning.initialize = function (callback) { pid_and_rc_to_form(); var $magHoldYawRate = $("#magHoldYawRate"), - $yawJumpPreventionLimit = $('#yawJumpPreventionLimit'), - $yawPLimit = $('#yawPLimit'), $gyroSoftLpfHz = $('#gyroSoftLpfHz'), $accSoftLpfHz = $('#accSoftLpfHz'), $dtermLpfHz = $('#dtermLpfHz'), - $yawLpfHz = $('#yawLpfHz'), - $axisAccelerationLimitRollPitch = $('#axisAccelerationLimitRollPitch'), - $axisAccelerationLimitYaw = $('#axisAccelerationLimitYaw'); + $yawLpfHz = $('#yawLpfHz'); $magHoldYawRate.val(INAV_PID_CONFIG.magHoldRateLimit); - $yawJumpPreventionLimit.val(INAV_PID_CONFIG.yawJumpPreventionLimit); - $yawPLimit.val(PID_ADVANCED.yawPLimit); $gyroSoftLpfHz.val(FILTER_CONFIG.gyroSoftLpfHz); $accSoftLpfHz.val(INAV_PID_CONFIG.accSoftLpfHz); $dtermLpfHz.val(FILTER_CONFIG.dtermLpfHz); $yawLpfHz.val(FILTER_CONFIG.yawLpfHz); - $axisAccelerationLimitRollPitch.val(PID_ADVANCED.axisAccelerationLimitRollPitch * 10); - $axisAccelerationLimitYaw.val(PID_ADVANCED.axisAccelerationLimitYaw * 10); $magHoldYawRate.change(function () { INAV_PID_CONFIG.magHoldRateLimit = parseInt($magHoldYawRate.val(), 10); }); - $yawJumpPreventionLimit.change(function () { - INAV_PID_CONFIG.yawJumpPreventionLimit = parseInt($yawJumpPreventionLimit.val(), 10); - }); - - $yawPLimit.change(function () { - PID_ADVANCED.yawPLimit = parseInt($yawPLimit.val(), 10); - }); - $gyroSoftLpfHz.change(function () { FILTER_CONFIG.gyroSoftLpfHz = parseInt($gyroSoftLpfHz.val(), 10); }); @@ -178,14 +160,6 @@ TABS.pid_tuning.initialize = function (callback) { FILTER_CONFIG.yawLpfHz = parseInt($yawLpfHz.val(), 10); }); - $axisAccelerationLimitRollPitch.change(function () { - PID_ADVANCED.axisAccelerationLimitRollPitch = Math.round(parseInt($axisAccelerationLimitRollPitch.val(), 10) / 10); - }); - - $axisAccelerationLimitYaw.change(function () { - PID_ADVANCED.axisAccelerationLimitYaw = Math.round(parseInt($axisAccelerationLimitYaw.val(), 10) / 10); - }); - if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) { $('.requires-v2_2').show(); } else {