From 9a74087762691ef63fd85883c2c465fc2846a21d Mon Sep 17 00:00:00 2001 From: IvoFPV Date: Tue, 24 Sep 2019 18:52:39 +0200 Subject: [PATCH] Fix esc protocol tooltip for removed dshot1200 --- locales/en/messages.json | 3 +++ src/js/tabs/configuration.js | 3 +++ src/tabs/configuration.html | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index 5cd003fc..6d67b091 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -5219,6 +5219,9 @@ "configurationEscProtocolHelp": { "message": "Select your motor protocol.
Make sure to verify the protocol is supported by your ESC, this information should be on the makers website.
Be carefull using DSHOT900 and DSHOT1200 as not many ESC's support it!" }, + "configurationEscProtocolHelpNoDSHOT1200": { + "message": "Select your motor protocol.
Make sure to verify the protocol is supported by your ESC, this information should be on the makers website." + }, "configurationunsyndePwm": { "message": "Motor PWM speed Separated from PID speed" }, diff --git a/src/js/tabs/configuration.js b/src/js/tabs/configuration.js index e26cd50e..1cbf2a80 100644 --- a/src/js/tabs/configuration.js +++ b/src/js/tabs/configuration.js @@ -516,6 +516,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) { $('input[name="motorPoles"]').val(MOTOR_CONFIG.motor_poles); } + $('#escProtocolTooltip').toggle(semver.lt(CONFIG.apiVersion, "1.42.0")); + $('#escProtocolTooltipNoDSHOT1200').toggle(semver.gte(CONFIG.apiVersion, "1.42.0")); + esc_protocol_e.val(PID_ADVANCED_CONFIG.fast_pwm_protocol + 1); esc_protocol_e.change(function () { var escProtocolValue = parseInt($(this).val()) - 1; diff --git a/src/tabs/configuration.html b/src/tabs/configuration.html index d0363f44..fdb7bc98 100644 --- a/src/tabs/configuration.html +++ b/src/tabs/configuration.html @@ -137,7 +137,8 @@ -
+
+