Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2022-06-07 17:40:28 +0300
committerPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2022-06-07 17:40:28 +0300
commit9492e08663ec6c4da95f5ea40dd8bafdc6c939a0 (patch)
treed95787d1e875f2dba02d9f8f0b26deb96d6f0376
parent3879eb78f084e7b517114a07b207c749966d28c0 (diff)
Drop the possibility to adjust ESC rate from GUIdzikuvx-refactor-esc-refresh-rate
-rw-r--r--tabs/outputs.html8
-rw-r--r--tabs/outputs.js41
2 files changed, 4 insertions, 45 deletions
diff --git a/tabs/outputs.html b/tabs/outputs.html
index 109e3958..6898a7a0 100644
--- a/tabs/outputs.html
+++ b/tabs/outputs.html
@@ -16,7 +16,6 @@
</div>
<!--list of generated features goes here-->
<div id="esc-protocols">
- <div id="esc-protocol-warning" class="warning-box"></div>
<div class="select">
<select name="esc-protocol" id="esc-protocol" data-setting-placeholder="motor_pwm_protocol"></select>
<label for="esc-protocol">
@@ -24,13 +23,6 @@
</label>
<div for="esc-protocol" class="helpicon cf_tip" data-i18n_title="escProtocolHelp"></div>
</div>
- <div class="select hide-for-shot">
- <select name="esc-rate" id="esc-rate" data-setting-placeholder="motor_pwm_rate"></select>
- <label for="esc-rate">
- <span data-i18n="escRefreshRate"></span>
- </label>
- <div for="esc-rate" class="helpicon cf_tip" data-i18n_title="escRefreshRatelHelp"></div>
- </div>
<div class="clear-both"></div>
</div>
diff --git a/tabs/outputs.js b/tabs/outputs.js
index 24205cb1..aa9daf53 100644
--- a/tabs/outputs.js
+++ b/tabs/outputs.js
@@ -99,24 +99,7 @@ TABS.outputs.initialize = function (callback) {
$motorStopWarningBox = $("#motor-stop-warning"),
$reversibleMotorBox = $(".for-reversible-motors");
- function buildMotorRates() {
- var protocolData = escProtocols[ADVANCED_CONFIG.motorPwmProtocol];
-
- $escRate.find('option').remove();
-
- for (var i in protocolData.rates) {
- if (protocolData.rates.hasOwnProperty(i)) {
- $escRate.append('<option value="' + i + '">' + protocolData.rates[i] + '</option>');
- }
- }
-
- /*
- * If rate from FC is not on the list, add a new entry
- */
- if ($escRate.find('[value="' + ADVANCED_CONFIG.motorPwmRate + '"]').length == 0) {
- $escRate.append('<option value="' + ADVANCED_CONFIG.motorPwmRate + '">' + ADVANCED_CONFIG.motorPwmRate + 'Hz</option>');
- }
-
+ function handleIdleMessageBox() {
$idleInfoBox.hide();
if (ADVANCED_CONFIG.motorPwmProtocol >= 5) {
$('.hide-for-shot').hide();
@@ -133,18 +116,10 @@ TABS.outputs.initialize = function (callback) {
$idleInfoBox.show();
}
}
-
- if (protocolData.message !== null) {
- $('#esc-protocol-warning').html(chrome.i18n.getMessage(protocolData.message));
- $('#esc-protocol-warning').show();
- } else {
- $('#esc-protocol-warning').hide();
- }
-
}
let $escProtocol = $('#esc-protocol');
- let $escRate = $('#esc-rate');
+
for (i in escProtocols) {
if (escProtocols.hasOwnProperty(i)) {
var protocolData = escProtocols[i];
@@ -153,21 +128,13 @@ TABS.outputs.initialize = function (callback) {
}
$escProtocol.val(ADVANCED_CONFIG.motorPwmProtocol);
- buildMotorRates();
- $escRate.val(ADVANCED_CONFIG.motorPwmRate);
$escProtocol.change(function () {
ADVANCED_CONFIG.motorPwmProtocol = $(this).val();
- buildMotorRates();
- ADVANCED_CONFIG.motorPwmRate = escProtocols[ADVANCED_CONFIG.motorPwmProtocol].defaultRate;
- $escRate.val(ADVANCED_CONFIG.motorPwmRate);
- });
-
- $escRate.change(function () {
- ADVANCED_CONFIG.motorPwmRate = $(this).val();
});
- $idlePercent.change(buildMotorRates);
+ $idlePercent.change(handleIdleMessageBox);
+ handleIdleMessageBox();
$("#esc-protocols").show();