#$ TITLE: 4.5 Filter settings for the RubberQuads Squirrel 35 (with RPM FILTERING).
#$ FIRMWARE_VERSION: 4.5
#$ CATEGORY: FILTERS
#$ STATUS: EXPERIMENTAL
#$ KEYWORDS: rubberquads, squirrel, DShot telemetry, filter, filters, clean, basic, betaflight
#$ AUTHOR: Volker Göschl-Covrljan
#$ DISCUSSION: https://discord.gg/RqbQBuh7pu

#$ PARSER: MARKED
#$ DESCRIPTION: <br>
#$ DESCRIPTION: <img src="https://www.rubberquads.com/static/rubberquads/RQ-logo_header.png" width="200px" style="margin-left: auto; margin-right: auto; display: block;"/>
#$ DESCRIPTION:
#$ DESCRIPTION: # Universal Filter Settings for 3"-4" rigs
#$ DESCRIPTION:
#$ DESCRIPTION: WARNING: Requires RPM filtering.  Ensure that bidirectional DShot working!
#$ DESCRIPTION: WARNING: May cause motor overheating -> Check temps after 30 seconds!
#$ DESCRIPTION: Intended for solid frames and clean props - will growl but fly home with bended props.
#$ DESCRIPTION: If motors get too hot, lower both filter-sliders by 0.2 and try again.



#$ INCLUDE: presets/4.5/filters/defaults.txt

# enable dshot with rpm telemetry
set motor_pwm_protocol = Dshot600
set dshot_bidir = ON

# -- Gyro filters --
# Standard dynamic gyro lowpass cascade
set gyro_lpf1_dyn_expo = 5

# -- Gyro Sliders (on by default) --
# 
set simplified_gyro_filter_multiplier = 200

# -- Gyro Static Notches (default)--

# -- Gyro Dynamic Notches --
set dyn_notch_count = 2
set dyn_notch_q = 600
set dyn_notch_min_hz = 100
set dyn_notch_max_hz = 600

# -- RPM filtering --
#$ INCLUDE_WARNING: misc/warnings/en/rpm_filters.txt
set dshot_bidir = ON
set rpm_filter_q = 650
set rpm_filter_min_hz = 120
set rpm_filter_fade_range_hz = 30

#$ OPTION_GROUP BEGIN: Count your magnets (in one bell)
    #$ OPTION BEGIN (CHECKED): a lot (14)
        set motor_poles = 14
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): a tad less (12)
        set motor_poles = 12
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: Choose your prop
    #$ OPTION BEGIN (CHECKED): Triblade
        set rpm_filter_harmonics = 3
        set rpm_filter_weights = 100,0,50
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): Biblade
        set rpm_filter_harmonics = 2
        set rpm_filter_weights = 100,70,0
    #$ OPTION END
#$ OPTION_GROUP END

# -- Dterm filtering --
set dterm_lpf1_dyn_min_hz = 108
set dterm_lpf1_dyn_max_hz = 217
set dterm_lpf1_dyn_expo = 5
set dterm_lpf1_type = PT1
set dterm_lpf1_static_hz = 108
set dterm_lpf2_type = PT1
set dterm_lpf2_static_hz = 217

# -- Dterm sliders 140 --
set simplified_dterm_filter = ON
set simplified_dterm_filter_multiplier = 140
simplified_tuning apply

# -- Yaw lowpass  --
set yaw_lowpass_hz = 110
# -- Accelerometer lowpass (default) --