1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

Merge pull request #685 from mosvov/hide-motor-pwm-for-dshot

Hide Motor PWM Speed Separated from PID Speed when DSHOT selected
This commit is contained in:
Michael Keller 2017-10-16 07:57:51 +13:00 committed by GitHub
commit 0b3315d196

View file

@ -309,16 +309,22 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
esc_protocol_e.val(PID_ADVANCED_CONFIG.fast_pwm_protocol + 1); esc_protocol_e.val(PID_ADVANCED_CONFIG.fast_pwm_protocol + 1);
esc_protocol_e.change(function () { esc_protocol_e.change(function () {
//hide not used setting for DSHOT protocol
if ($(this).val() - 1 >= self.DSHOT_PROTOCOL_MIN_VALUE) { if ($(this).val() - 1 >= self.DSHOT_PROTOCOL_MIN_VALUE) {
$('div.minthrottle').hide(); $('div.minthrottle').hide();
$('div.maxthrottle').hide(); $('div.maxthrottle').hide();
$('div.mincommand').hide(); $('div.mincommand').hide();
$('div.checkboxPwm').hide();
$('div.unsyncedpwmfreq').hide();
$('div.digitalIdlePercent').show(); $('div.digitalIdlePercent').show();
} else { } else {
$('div.minthrottle').show(); $('div.minthrottle').show();
$('div.maxthrottle').show(); $('div.maxthrottle').show();
$('div.mincommand').show(); $('div.mincommand').show();
$('div.checkboxPwm').show();
//trigger change unsyncedPWMSwitch to show/hide Motor PWM freq input
$("input[id='unsyncedPWMSwitch']").change();
$('div.digitalIdlePercent').hide(); $('div.digitalIdlePercent').hide();
} }