From a53cbd23ad84fda0b558f60b9b8f21bd0973840d Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Sat, 7 Nov 2020 17:19:43 +0100 Subject: [PATCH] Minor fixes on PID Tuning tab --- _locales/en/messages.json | 13 ++----------- js/fc.js | 5 ++++- tabs/pid_tuning.html | 14 -------------- tabs/pid_tuning.js | 5 +++++ 4 files changed, 11 insertions(+), 26 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 8cf9e985..43c93a5b 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1031,11 +1031,8 @@ "pidTuningFeedForward": { "message": "FeedForward" }, - "dtermSetpointWeight": { - "message": "Dterm setpoint weight" - }, - "dtermSetpointWeightHelp": { - "message": "The lower the value, the more damped all the maneuvers are. 0 mean Dterm is computed from gyro, 1 from error and 2 from setpoint. For gentler feel lower the value. For sharper response, raise it" + "pidTuningControlDerivative": { + "message": "Constrol Derivative" }, "pidTuningRollPitchRate": { "message": "ROLL & PITCH rate" @@ -3361,12 +3358,6 @@ "itermRelaxHelp": { "message": "Defines Iterm relaxation algorithm activation. PR mean it's active on Roll and Pitch axis. PRY is active also on Yaw." }, - "itermRelaxType": { - "message": "Iterm Relax Type" - }, - "itermRelaxTypeHelp": { - "message": "GYRO mode is more clinical and complete in suppressing iTerm, SETPOINT mode is a bit smoother with slightly softer landings after flips." - }, "itermRelaxCutoff": { "message": "Iterm Relax Cutoff Frequency" }, diff --git a/js/fc.js b/js/fc.js index fe2d764f..749f535c 100644 --- a/js/fc.js +++ b/js/fc.js @@ -66,11 +66,14 @@ var FC = { MAX_SERVO_RATE: 125, MIN_SERVO_RATE: 0, isRpyFfComponentUsed: function () { - return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT) || (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR && semver.gte(CONFIG.flightControllerVersion, "2.6.0")); + return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT) || ((MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) && semver.gte(CONFIG.flightControllerVersion, "2.6.0")); }, isRpyDComponentUsed: function () { return MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER; }, + isCdComponentUsed: function () { + return FC.isRpyDComponentUsed(); + }, resetState: function () { SENSOR_STATUS = { isHardwareHealthy: 0, diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 289f9dc7..0a1e8d43 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -508,13 +508,6 @@
- - - - -
- - diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index f054c88b..bdceb7cb 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -112,6 +112,11 @@ TABS.pid_tuning.initialize = function (callback) { // translate to user-selected language localize(); + if (FC.isCdComponentUsed()) { + $('th.feedforward').html(chrome.i18n.getMessage('pidTuningControlDerivative')); + $('th.feedforward').attr('title', chrome.i18n.getMessage('pidTuningControlDerivative')); + } + if (semver.gte(CONFIG.flightControllerVersion, "2.4.0")) { $('.requires-v2_4').show(); } else {