#$ TITLE: AOS 4 Filters
#$ FIRMWARE_VERSION: 4.5
#$ CATEGORY: FILTERS
#$ STATUS: COMMUNITY
#$ KEYWORDS: filter, filters, aos, chris, rosser, 4
#$ AUTHOR: Chris Rosser
#$ DESCRIPTION: Developed for the AOS 4
#$ DESCRIPTION: NOTE this needs bidirectional Dshot support and RPM filtering active to use. DO NOT ATEMPT TO USE WITH OUT RPM FILTERING!
#$ DESCRIPTION: Follow the usual process of hover testing and safely checking out your tune before using. USE AT YOUR OWN RISK.
#$ DISCUSSION: https://www.aos-rc.com
#$ INCLUDE_WARNING: misc/warnings/en/rpm_filters.txt
#$ INCLUDE: presets/4.5/filters/defaults.txt

# -- Gyro lowpass filters --
set gyro_lpf1_dyn_min_hz = 0
set gyro_lpf1_dyn_max_hz = 0
set gyro_lpf1_static_hz = 0
set gyro_lpf2_static_hz = 1000
set simplified_gyro_filter = OFF

# -- Gyro Dynamic Notches --
set dyn_notch_count = 1
set dyn_notch_q = 500
set dyn_notch_min_hz = 150

# -- RPM filtering --
set dshot_bidir = ON
set rpm_filter_harmonics = 3
set rpm_filter_fade_range_hz = 50
set rpm_filter_min_hz = 100

# -- Dterm filtering --
set dterm_lpf1_dyn_min_hz = 80
set dterm_lpf1_dyn_max_hz = 110
set dterm_lpf1_type = BIQUAD
set dterm_lpf2_static_hz = 0
set simplified_dterm_filter = OFF

# ------ OPIONS GO BELOW THIS LINE ------

# -- RPM Filter Weights --

#$ OPTION_GROUP BEGIN: Props
    #$ OPTION BEGIN (CHECKED): RPM Filter Weights for triblade props
        set rpm_filter_weights = 100, 0, 80
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): RPM Filter Weights for other props
        set rpm_filter_weights = 100, 100, 100
    #$ OPTION END
#$ OPTION_GROUP END