#$ TITLE: UAV Tech - Cinewhoop
#$ FIRMWARE_VERSION: 4.3
#$ CATEGORY: TUNE
#$ STATUS: EXPERIMENTAL
#$ KEYWORDS: cinewhoop
#$ AUTHOR: UAV Tech (Mark Spatz)

#$ PARSER: MARKED

#$ DESCRIPTION: I am a Betaflight contributor, Youtube content creator, and professional tuner [www.theuavtech.com](https://www.theuavtech.com)
#$ DESCRIPTION: 
#$ DESCRIPTION: <img src="https://i0.wp.com/theuavtech.com/wp-content/uploads/2020/10/icon-150x150-1.png" width="125px" style="margin-left: auto; margin-right: auto; display: block;"/>
#$ DESCRIPTION: 
#$ DESCRIPTION: Information:
#$ DESCRIPTION: -----------
#$ DESCRIPTION: Base tune for a Cinewhoop.  This tune is good for 4S or 6S batteries.
#$ DESCRIPTION: The base preset assume you have your ESC set to 24K PWM (default). If you are on 48K+, click the option above.
#$ DESCRIPTION: Also if you would like to use with the RPM filtering or Dynamic Idle, click the option above.
#$ DESCRIPTION: If you don't know what these features mean, click the links below for videos on each topic.
#$ DESCRIPTION: 
#$ DESCRIPTION: Options (click for video):
#$ DESCRIPTION: -----------
#$ DESCRIPTION: - [48K ESC PWM](https://youtu.be/v3806Incpvo)
#$ DESCRIPTION: - [96K ESC PWM](https://youtu.be/v3806Incpvo)
#$ DESCRIPTION: - [RPM Filter](https://youtu.be/ve_TNB0D87U)
#$ DESCRIPTION: - [Dynamic Idle](https://youtu.be/2Mr-AP7K8YE)
#$ DESCRIPTION: 
#$ WARNING: Prior to selecting the "RPM Filter" or "Dynamic Idle" options, Bi-Directional DSHOT must be setup for your quad.  If you have not setup yet, click "CANCEL" and setup first (PROPS OFF to test).  If you have NOT selected the "RPM Filter" or "Dynamic Idle" options, YOU CAN IGNORE THIS MESSAGE.
#$ DISCUSSION: https://github.com/betaflight/firmware-presets/pull/208
#$ INCLUDE: presets/4.3/tune/defaults.txt
#$ INCLUDE: presets/4.3/filters/defaults.txt

# -- Filter Settings --
set simplified_dterm_filter = ON
set simplified_gyro_filter = ON
set dyn_notch_count = 4
set dyn_notch_min_hz = 100
set dyn_notch_max_hz = 1000
set simplified_gyro_filter_multiplier = 150

# -- PID Settings --
set vbat_sag_compensation = 100
set anti_gravity_gain = 10000
set iterm_relax_cutoff = 10
set simplified_d_gain = 140
set simplified_pi_gain = 100
set simplified_feedforward_gain = 100
set simplified_dmax_gain = 0
set simplified_i_gain = 100
set simplified_pitch_d_gain = 100
set simplified_pitch_pi_gain = 100
set simplified_master_multiplier = 160

simplified_tuning apply

#$ OPTION BEGIN (UNCHECKED): 48k ESC PWM
# -- ADDER: For 48khz PWM --
set thrust_linear = 20
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): 96k ESC PWM
# -- ADDER: For 96khz PWM --
set thrust_linear = 40
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): RPM filtering
set dshot_bidir = ON
set rpm_filter_harmonics = 2
set dyn_notch_count = 2
#$ OPTION END

#$ OPTION BEGIN (UNCHECKED): Dynamic Idle
set dshot_bidir = ON
set dyn_idle_min_rpm = 35
#$ OPTION END
