diff options
author | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2022-05-09 22:35:46 +0300 |
---|---|---|
committer | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2022-05-09 22:35:46 +0300 |
commit | 600aac2d3217606a099396228a41181faee108e0 (patch) | |
tree | 7d8d58f4626887fb57193c1e2fd1cac2159ccaf0 /tabs | |
parent | f697bc2132c1ea312352f4dbdb8e70e781bc60cf (diff) |
Simplificationsdzikuvx-slider-tuning
Diffstat (limited to 'tabs')
-rw-r--r-- | tabs/pid_tuning.html | 24 | ||||
-rw-r--r-- | tabs/pid_tuning.js | 14 |
2 files changed, 12 insertions, 26 deletions
diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index bafa0bd7..cedfe2e3 100644 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -26,25 +26,25 @@ <div class="cf_column" id="pid-sliders"> <div class="pid-sliders-axis" data-axis="roll"> <h3 data-i18n="axisRoll"></h3> - <div class="pid-slider-row" data-axis="roll" data-component="p"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Proportional"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="roll" data-component="i"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Integral"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="roll" data-component="d"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Derivative"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="60"> </div> - <div class="pid-slider-row" data-axis="roll" data-component="ff"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_FeedForward"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="150"> @@ -54,25 +54,25 @@ <div class="pid-sliders-axis" data-axis="pitch"> <h3 data-i18n="axisPitch"></h3> - <div class="pid-slider-row" data-axis="pitch" data-component="p"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Proportional"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="pitch" data-component="i"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Integral"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="pitch" data-component="d"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Derivative"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="60"> </div> - <div class="pid-slider-row" data-axis="pitch" data-component="ff"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_FeedForward"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="150"> @@ -82,25 +82,25 @@ <div class="pid-sliders-axis" data-axis="yaw"> <h3 data-i18n="axisYaw"></h3> - <div class="pid-slider-row" data-axis="yaw" data-component="p"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Proportional"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="yaw" data-component="i"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_Integral"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="110"> </div> - <div class="pid-slider-row" data-axis="yaw" data-component="d"> + <div class="pid-slider-row""> <span data-i18n="pidTuning_Derivative"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="60"> </div> - <div class="pid-slider-row" data-axis="yaw" data-component="ff"> + <div class="pid-slider-row"> <span data-i18n="pidTuning_FeedForward"></span> <input type="number" name="value-input" value="42" min="0" max="255" step="1" class="controlProfileHighlightActive"> <input type="range" name="value-slider" value="42" min="0" max="1000" step="1" data-normal-max="150"> diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index cec0ba4f..486090eb 100644 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -186,12 +186,6 @@ TABS.pid_tuning.initialize = function (callback) { } }); - function scaleRangeInt(x, srcMin, srcMax, destMin, destMax) { - let a = (destMax - destMin) * (x - srcMin); - let b = srcMax - srcMin; - return Math.round((a / b) + destMin); - } - $(".pid-slider-row [name='value-slider']").on('input', function () { let val = $(this).val(); let normalMax = parseInt($(this).data('normal-max')); @@ -238,14 +232,6 @@ TABS.pid_tuning.initialize = function (callback) { axis++; }); - let $magHoldYawRate = $("#magHoldYawRate"); - - $magHoldYawRate.val(INAV_PID_CONFIG.magHoldRateLimit); - - $magHoldYawRate.change(function () { - INAV_PID_CONFIG.magHoldRateLimit = parseInt($magHoldYawRate.val(), 10); - }); - if (!FC.isRpyFfComponentUsed()) { $('.rpy_ff').prop('disabled', 'disabled'); } |