Skip to content

Commit 9927aa2

Browse files
authored
Fix dynamic filter (#3153)
1 parent bc6307a commit 9927aa2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/js/tabs/motors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ motors.initialize = async function (callback) {
674674
self.previousFilterDynCount = FC.FILTER_CONFIG.dyn_notch_count;
675675

676676
dshotBidirElement.on("change", function () {
677-
FC.MOTOR_CONFIG.use_dshot_telemetry = $(this).prop('checked');
677+
FC.MOTOR_CONFIG.use_dshot_telemetry = dshotBidirElement.is(':checked');
678678

679679
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
680680
const rpmFilterIsDisabled = FC.FILTER_CONFIG.gyro_rpm_notch_harmonics === 0;
@@ -691,10 +691,10 @@ motors.initialize = async function (callback) {
691691
};
692692

693693
const _dynFilterChange = function() {
694-
if (value && !self.previousDshotBidir) {
694+
if (FC.MOTOR_CONFIG.use_dshot_telemetry && !self.previousDshotBidir) {
695695
FC.FILTER_CONFIG.dyn_notch_count = FILTER_DEFAULT.dyn_notch_count_rpm;
696696
FC.FILTER_CONFIG.dyn_notch_q = FILTER_DEFAULT.dyn_notch_q_rpm;
697-
} else if (!value && self.previousDshotBidir) {
697+
} else if (!FC.MOTOR_CONFIG.use_dshot_telemetry && self.previousDshotBidir) {
698698
FC.FILTER_CONFIG.dyn_notch_count = FILTER_DEFAULT.dyn_notch_count;
699699
FC.FILTER_CONFIG.dyn_notch_q = FILTER_DEFAULT.dyn_notch_q;
700700
}

0 commit comments

Comments
 (0)