#$ TITLE:  FPVCycle Incisor/Prototype 5 6s Tune | mouseFPV
#$ FIRMWARE_VERSION: 4.5
#$ CATEGORY: TUNE
#$ STATUS: COMMUNITY
#$ KEYWORDS: FPVCycle, 5 inch, 5in, 6S, freestyle, GoPro, mouse fpv
#$ AUTHOR: mouseFPV
#$ PARSER: MARKED
#$ DESCRIPTION: <br>
#$ DESCRIPTION: <img src="https://user-images.githubusercontent.com/19867640/174462482-28bdcfec-1c3a-43db-99d7-50688b92f050.svg" width="100px" style="margin-left: auto; margin-right: auto; display: block;"/>
#$ DESCRIPTION:
#$ DESCRIPTION: # Tune for FPVCycle Incisor/Prototype 5
#$ DESCRIPTION:
#$ DESCRIPTION: ## About:
#$ DESCRIPTION: * If tune is too spicy, lower the master by a click or bring in a motor limit
#$ DESCRIPTION: * Recommended 48k PWM
#$ DESCRIPTION: * Uses Multi-Dynamic notich by default. Options for RPM filtering which use Dshot. Using DShot on Unsupported ESC's is Dangerous. See Warning.
#$ DESCRIPTION: * RPM Filtering is recommended
#$ DESCRIPTION:
#$ DESCRIPTION: ## Options:
#$ DESCRIPTION: ### **Filters:**
#$ DESCRIPTION: * **RPM Filters DShot600**: Enables RPM filtering. ESCs must support bi-directional. Sets Dshot600.
#$ DESCRIPTION: * **RPM Filters DShot300**: Enables RPM filtering. ESCs must support bi-directional. Sets Dshot300.
#$ DESCRIPTION:
#$ DESCRIPTION: ### **Additional Options:**
#$ DESCRIPTION: * **Dynamic Idle:** Enables Dynamic Idle for Freestyle 5"
#$ DESCRIPTION: * **Set 93% Motor Limit:** Simulates 1800-1900kv motors down closer to 1700kv
#$ DESCRIPTION: * **Enable Battery Sag Compensation:** Self Explanatory (see tooltip). Land at 3.5v/Cell or it's a bad time.
#$ DESCRIPTION: * **Heavy Action Camera:** Increases the Pids/Master Slider
#$ DESCRIPTION:
#$ DESCRIPTION: ## Build Specs This Was Created On:
#$ DESCRIPTION: * **Frame:** FPVCycle Incisor/PT5
#$ DESCRIPTION: * **Motors:** FPVCycle 25mm Emerald 1880kv w/ 93 % Motor Limit 6s
#$ DESCRIPTION: * **FC:** TMotor F7 (MPU6000)
#$ DESCRIPTION: * **ESC:** TMotor F55a (non f3)
#$ DESCRIPTION: * **Action Cam:** GoPro Hero 5 Session
#$ DESCRIPTION: * **AUW:** 660-670g
#$ DESCRIPTION:
#$ DESCRIPTION: ## Fly Like mouseFPV | Recommendations Outside of Tune:
#$ DESCRIPTION: * Apply mouseFPV Freestyle Rates
#$ DESCRIPTION: * Use 250hz radio link if possible
#$ DESCRIPTION: * **Set Jitter Reduction (feedforward_jitter_factor) to 14**
#$ DESCRIPTION: * Set Feedforward Boost (feedforward_boost) to 10
#$ DESCRIPTION:
#$ DISCUSSION: https://github.com/betaflight/firmware-presets/pull/254
#$ WARNING: If You Choose To Include Filters, Please, See The Following:
#$ INCLUDE_WARNING: misc/warnings/en/dshot.txt
#$ FORCE_OPTIONS_REVIEW: TRUE

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

# -- End Defaults --
# -- Begin Mouse Tune --

# -- PID Sliders  --
set simplified_pids_mode = RPY
set simplified_d_gain = 135
set simplified_pi_gain = 100
set simplified_feedforward_gain = 70
set simplified_dmax_gain = 000
set simplified_i_gain = 090
set simplified_pitch_d_gain = 110
set simplified_pitch_pi_gain = 115
set simplified_master_multiplier = 110
simplified_tuning apply

# -- iTerm relax --
set iterm_relax = RP
set iterm_relax_type = SETPOINT
set iterm_relax_cutoff = 10

# -- TPA  --
set tpa_rate = 75

# -- Thrust linear  --
set thrust_linear = 20


# -- DShot Idle (default)--
# Commonly set lower when dynamic idle is active.
set dshot_idle_value = 400


# -- Filters for non bi-directional setups as a base--


# -- Gyro lowpass filters --
# -- No Gyro Lowpass
set gyro_lpf1_static_hz = 0
set gyro_lpf1_dyn_min_hz = 0
set gyro_lpf1_dyn_max_hz = 0
set simplified_gyro_filter = ON
set simplified_gyro_filter_multiplier = 140
simplified_tuning apply

# -- Gyro Dynamic Notches --
set dyn_notch_count = 4
set dyn_notch_q = 375
set dyn_notch_min_hz = 125
set dyn_notch_max_hz = 600

# -- Dterm filtering --
set dterm_lpf1_dyn_min_hz = 93
set dterm_lpf1_dyn_max_hz = 187
set dterm_lpf1_dyn_expo = 5
set dterm_lpf1_static_hz = 93
set dterm_lpf2_static_hz = 187

# -- Dterm sliders --
set simplified_dterm_filter_multiplier = 125

# -- Yaw lowpass --
set yaw_lowpass_hz = 100


# ------ OPTIONS GO BELOW THIS LINE ------


#$ OPTION_GROUP BEGIN: (EXCLUSIVE) Filters (Choose One or None)
    #$ OPTION BEGIN (CHECKED): RPM Filters DShot600
        # -- Filter Settings --

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

        # -- End Defaults --
        # -- Begin Mouse Filters --

        # enable dshot rpm telemetry
        set motor_pwm_protocol = DSHOT600
        set dshot_bidir = ON
        set motor_poles = 14

        # -- Gyro lowpass filters --
        # -- No Gyro Lowpass
        set gyro_lpf1_static_hz = 0
        set gyro_lpf1_dyn_min_hz = 0
        set gyro_lpf1_dyn_max_hz = 0
        set simplified_gyro_filter = ON
        set simplified_gyro_filter_multiplier = 140
        simplified_tuning apply

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

        # -- RPM filtering --
        set rpm_filter_q = 500
        set rpm_filter_min_hz = 125
        set rpm_filter_fade_range_hz = 60

        # -- Dterm filtering --
        set dterm_lpf1_dyn_min_hz = 93
        set dterm_lpf1_dyn_max_hz = 187
        set dterm_lpf1_dyn_expo = 5
        set dterm_lpf1_static_hz = 93
        set dterm_lpf2_static_hz = 187

        # -- Dterm sliders --
        set simplified_dterm_filter_multiplier = 125

        # -- Yaw lowpass --
        set yaw_lowpass_hz = 100
    #$ OPTION END


    #$ OPTION BEGIN (UNCHECKED): RPM Filters DShot300
        # -- Filter Settings --

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

        # -- End Defaults --
        # -- Begin Mouse Filters --

        # enable dshot rpm telemetry
        set motor_pwm_protocol = DSHOT300
        set dshot_bidir = ON
        set motor_poles = 14

        # -- Gyro lowpass filters --
        # -- No Gyro Lowpass
        set gyro_lpf1_static_hz = 0
        set gyro_lpf1_dyn_min_hz = 0
        set gyro_lpf1_dyn_max_hz = 0
        set simplified_gyro_filter = ON
        set simplified_gyro_filter_multiplier = 140
        simplified_tuning apply

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

        # -- RPM filtering --
        set rpm_filter_q = 500
        set rpm_filter_min_hz = 125
        set rpm_filter_fade_range_hz = 60


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

        # -- Yaw lowpass --
        set yaw_lowpass_hz = 100
    #$ OPTION END
#$ OPTION_GROUP END


#$ OPTION_GROUP BEGIN: Additional Options (Choose Many or None)
    #$ OPTION BEGIN (CHECKED): Dynamic Idle
        set dyn_idle_min_rpm = 20
        set dyn_idle_p_gain = 45
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): Set 93% Motor Limit
        set motor_output_limit = 93
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): Enable Battery Sag Compensation
        set vbat_sag_compensation = 100
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): Heavy Action Cam (Hero8/9/10)
        set simplified_master_multiplier = 120
        simplified_tuning apply
    #$ OPTION END
#$ OPTION_GROUP END
