Skip to content

Commit 074bb46

Browse files
authored
Fix esc protocol tooltip for removed dshot1200 (#1689)
Fix esc protocol tooltip for removed dshot1200
2 parents 1d1b974 + 9a74087 commit 074bb46

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

locales/en/messages.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,6 +5228,9 @@
52285228
"configurationEscProtocolHelp": {
52295229
"message": "Select your motor protocol. <br>Make sure to verify the protocol is supported by your ESC, this information should be on the makers website. <br> <b>Be carefull using DSHOT900 and DSHOT1200 as not many ESC's support it!</b>"
52305230
},
5231+
"configurationEscProtocolHelpNoDSHOT1200": {
5232+
"message": "Select your motor protocol. <br>Make sure to verify the protocol is supported by your ESC, this information should be on the makers website."
5233+
},
52315234
"configurationunsyndePwm": {
52325235
"message": "Motor PWM speed Separated from PID speed"
52335236
},

src/js/tabs/configuration.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
516516
$('input[name="motorPoles"]').val(MOTOR_CONFIG.motor_poles);
517517
}
518518

519+
$('#escProtocolTooltip').toggle(semver.lt(CONFIG.apiVersion, "1.42.0"));
520+
$('#escProtocolTooltipNoDSHOT1200').toggle(semver.gte(CONFIG.apiVersion, "1.42.0"));
521+
519522
esc_protocol_e.val(PID_ADVANCED_CONFIG.fast_pwm_protocol + 1);
520523
esc_protocol_e.change(function () {
521524
var escProtocolValue = parseInt($(this).val()) - 1;

src/tabs/configuration.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
<!-- list generated here -->
138138
</select>
139139
<span i18n="configurationEscProtocol"></span>
140-
<div class="helpicon cf_tip" i18n_title="configurationEscProtocolHelp"></div>
140+
<div id="escProtocolTooltip" class="helpicon cf_tip" i18n_title="configurationEscProtocolHelp"></div>
141+
<div id="escProtocolTooltipNoDSHOT1200" class="helpicon cf_tip" i18n_title="configurationEscProtocolHelpNoDSHOT1200"></div>
141142
</label>
142143
</div>
143144
<div class="number checkboxPwm">

0 commit comments

Comments
 (0)