Skip to content

Commit 0b3315d

Browse files
authored
Merge pull request #685 from mosvov/hide-motor-pwm-for-dshot
Hide Motor PWM Speed Separated from PID Speed when DSHOT selected
2 parents 975ef1e + 819c4c8 commit 0b3315d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tabs/configuration.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,22 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
309309
esc_protocol_e.val(PID_ADVANCED_CONFIG.fast_pwm_protocol + 1);
310310

311311
esc_protocol_e.change(function () {
312+
//hide not used setting for DSHOT protocol
312313
if ($(this).val() - 1 >= self.DSHOT_PROTOCOL_MIN_VALUE) {
313314
$('div.minthrottle').hide();
314315
$('div.maxthrottle').hide();
315316
$('div.mincommand').hide();
317+
$('div.checkboxPwm').hide();
318+
$('div.unsyncedpwmfreq').hide();
316319

317320
$('div.digitalIdlePercent').show();
318321
} else {
319322
$('div.minthrottle').show();
320323
$('div.maxthrottle').show();
321324
$('div.mincommand').show();
325+
$('div.checkboxPwm').show();
326+
//trigger change unsyncedPWMSwitch to show/hide Motor PWM freq input
327+
$("input[id='unsyncedPWMSwitch']").change();
322328

323329
$('div.digitalIdlePercent').hide();
324330
}

0 commit comments

Comments
 (0)