@@ -444,7 +444,7 @@ TABS.pid_tuning.initialize = function (callback) {
444444 dynamicNotchQ_e . val ( FC . FILTER_CONFIG . dyn_notch_q ) ;
445445 dynamicNotchWidthPercent_e . val ( FC . FILTER_CONFIG . dyn_notch_width_percent ) ;
446446 }
447-
447+ $ ( '.rpmFilter span.suboption' ) . toggle ( checked ) ;
448448 } ) . prop ( 'checked' , FC . FILTER_CONFIG . gyro_rpm_notch_harmonics != 0 ) . change ( ) ;
449449
450450 } else {
@@ -702,6 +702,8 @@ TABS.pid_tuning.initialize = function (callback) {
702702 $ ( '.pid_filter input[name="dTermNotchFrequency"]' ) . val ( checked ? hz : 0 ) . attr ( 'disabled' , ! checked )
703703 . attr ( "min" , checked ? 1 : 0 ) . change ( ) ;
704704 $ ( '.pid_filter input[name="dTermNotchCutoff"]' ) . attr ( 'disabled' , ! checked ) . change ( ) ;
705+
706+ $ ( '.dtermNotch span.suboption' ) . toggle ( checked ) ;
705707 } ) ;
706708
707709 // gyro filter selectors
@@ -737,7 +739,7 @@ TABS.pid_tuning.initialize = function (callback) {
737739 gyroLowpassDynEnabled . prop ( 'checked' , false ) . change ( ) ;
738740 }
739741
740- // gyroLowpassOption.toggle(checked);
742+ gyroLowpassOption . toggle ( checked ) ;
741743 self . updateFilterWarning ( ) ;
742744 } ) ;
743745
@@ -762,7 +764,7 @@ TABS.pid_tuning.initialize = function (callback) {
762764 gyroLowpassEnabled . prop ( 'checked' , true ) . change ( ) ;
763765 }
764766
765- // gyroLowpassDynOption.toggle(checked);
767+ gyroLowpassDynOption . toggle ( checked ) ;
766768 self . updateFilterWarning ( ) ;
767769 } ) ;
768770
@@ -774,7 +776,7 @@ TABS.pid_tuning.initialize = function (callback) {
774776
775777 gyroLowpass2Frequency . val ( checked ? cutoff : 0 ) . attr ( 'disabled' , ! checked ) . attr ( "min" , checked ? 1 : 0 ) ; //.change();
776778 gyroLowpass2Type . val ( type ) . attr ( 'disabled' , ! checked ) ; //.change();
777- // gyroLowpass2Option.toggle(checked);
779+ gyroLowpass2Option . toggle ( checked ) ;
778780 self . updateFilterWarning ( ) ;
779781 } ) ;
780782
@@ -798,6 +800,7 @@ TABS.pid_tuning.initialize = function (callback) {
798800 if ( checked ) {
799801 $ ( 'input[id="dtermLowpassDynEnabled"]' ) . prop ( 'checked' , false ) . change ( ) ;
800802 }
803+ $ ( '.dtermLowpass span.suboption' ) . toggle ( checked ) ;
801804 self . updateFilterWarning ( ) ;
802805 } ) ;
803806
@@ -828,6 +831,7 @@ TABS.pid_tuning.initialize = function (callback) {
828831 $ ( 'input[id="dtermLowpassEnabled"]' ) . prop ( 'checked' , true ) . change ( ) ;
829832 $ ( '.pid_filter input[id="dtermLowpassDynExpoEnabled"]' ) . prop ( 'checked' , false ) . change ( ) ;
830833 }
834+ $ ( '.dtermLowpassDyn span.suboption' ) . toggle ( checked ) ;
831835 self . updateFilterWarning ( ) ;
832836 } ) ;
833837
@@ -846,6 +850,7 @@ TABS.pid_tuning.initialize = function (callback) {
846850 $ ( '.pid_filter input[name="dtermLowpass2Frequency"]' ) . val ( checked ? cutoff : 0 ) ;
847851 $ ( '.pid_filter input[name="dtermLowpass2Frequency"]' ) . attr ( 'disabled' , ! checked ) ;
848852 $ ( '.pid_filter select[name="dtermLowpass2Type"]' ) . val ( type ) . attr ( 'disabled' , ! checked ) ;
853+ $ ( '.dtermLowpass2 span.suboption' ) . toggle ( checked ) ;
849854 } ) ;
850855
851856 $ ( '.pid_filter input[name="dtermLowpassDynMinFrequency"]' ) . on ( 'input' , ( ) => $ ( 'input[id="dtermLowpassDynEnabled"]' ) . prop ( 'checked' , false ) . trigger ( 'change' ) ) ;
@@ -858,6 +863,7 @@ TABS.pid_tuning.initialize = function (callback) {
858863 const cutoff = FC . FILTER_CONFIG . yaw_lowpass_hz > 0 ? FC . FILTER_CONFIG . yaw_lowpass_hz : FILTER_DEFAULT . yaw_lowpass_hz ;
859864
860865 $ ( '.pid_filter input[name="yawLowpassFrequency"]' ) . val ( checked ? cutoff : 0 ) . attr ( 'disabled' , ! checked ) ;
866+ $ ( '.yawLowpass span.suboption' ) . toggle ( checked ) ;
861867 } ) ;
862868
863869 // The notch cutoff must be smaller than the notch frecuency
@@ -2268,15 +2274,14 @@ TABS.pid_tuning.initialize = function (callback) {
22682274 } ) ;
22692275
22702276 // update on pid table inputs
2271- $ ( '#pid_main input' ) . on ( 'input' , function ( e ) {
2272- console . log ( e . target . id ) ;
2277+ $ ( '#pid_main input' ) . on ( 'input' , function ( ) {
22732278 if ( semver . lt ( FC . CONFIG . apiVersion , API_VERSION_1_44 ) ) {
22742279 TuningSliders . updatePidSlidersDisplay ( ) ;
22752280 self . analyticsChanges [ 'PidTuningSliders' ] = "Off" ;
22762281 }
22772282 } ) ;
22782283 // update on filter value or type changes
2279- $ ( '.pid_filter tr:not(.newFilter) input, .pid_filter tr:not(.newFilter) select' ) . on ( 'input' , function ( ) {
2284+ $ ( '.pid_filter tr:not(.newFilter) input, .pid_filter tr:not(.newFilter) select' ) . on ( 'input' , function ( e ) {
22802285 TuningSliders . updateFilterSlidersDisplay ( ) ;
22812286 if ( TuningSliders . GyroSliderUnavailable ) {
22822287 self . analyticsChanges [ 'GyroFilterTuningSlider' ] = "Off" ;
0 commit comments