#$ TITLE: ZoeFPV 3d tuneup
#$ FIRMWARE_VERSION: 4.5
#$ CATEGORY: TUNE
#$ STATUS: EXPERIMENTAL
#$ KEYWORDS: rates, freestyle, juicy, sbang, zoeFPV, zoe, 3d, upside down, sugarK, sliders
#$ AUTHOR: ZoeFPV

#$ PARSER: MARKED

#$ DESCRIPTION: <img src="https://cdn.discordapp.com/attachments/1175277085321863188/1178779293376057425/ZoeClearBackground.png?ex=657762c4&is=6564edc4&hm=1c6b4d99f7a96c8c27ff8af42383848f5c5109bb9cff46e1d7a3a08204779557&" style="max-width: 35%; margin-left: auto; margin-right: auto; display: block;"/>
#$ DESCRIPTION: <br /><br />
#$ DESCRIPTION: ZoeFPV 3D setup and tunes
#$ DESCRIPTION: <br /><br />
#$ DESCRIPTION: This preset has everything you need for a smooth 3D flying experience, no longer guess if you have BetaFlight setup right! Includes my legendary rate profile that I’ve used for years, along with 2 variations of it depending on your own style and feel, plus KittFPV’s rates for a more linear and locked in experience.
#$ DESCRIPTION: Each rate has been tested for it’s ability to do chaotic 3D manoeuvres, and for tight tic-tocs.
#$ DESCRIPTION:
#$ DESCRIPTION: Included PID Presets are for 4s, on a Unicorn airframe, running 2208-1950kv motors. Should work with any well made frame in good condition. 
#$ DESCRIPTION: Have been tested on 2207-2450kv motors. 
#$ DESCRIPTION:
#$ DESCRIPTION: Will add 5s and 6s tune to this preset in the near future. And yes this has airmode on and should be kept on.
#$ DESCRIPTION: Also there is a ‘reset’ option to remove the 3D settings in the 3D setup.
#$ DESCRIPTION:
#$ DESCRIPTION: Special thanks to Aeon, Allie aka KittFPV, and Devin Davis
#$ DESCRIPTION:
#$ DESCRIPTION: <br /><br />
#$ DESCRIPTION: [YouTube](www.youtube.com/@ZoeFPV)
#$ DESCRIPTION: 
#$ DESCRIPTION: [Instagram](https://www.instagram.com/zoefpv/)
#$ DESCRIPTION: 
#$ DESCRIPTION: [Discord with 3D Pilots around to help](https://discord.com/invite/nRn9gU3)
#$ DESCRIPTION:
#$ DESCRIPTION: <br /><br />
#$ DESCRIPTION: Co authored by sugarK
#$ DESCRIPTION:
#$ DESCRIPTION:
#$ DESCRIPTION: Radio links:
#$ DESCRIPTION: 1. Make sure your radio firmware is up to date using either EdgeTX or OpenTX
#$ DESCRIPTION: 2. Make sure your **ADC Filter is OFF** in the hardware page
#$ DESCRIPTION: 3. Go to the radio (RC_LINK) presets and apply the correct setup for your system and link speed, some links available in the preset below.

#$ DISCUSSION: https://github.com/betaflight/firmware-presets/pull/440

#$ WARNING: WARNING: YOU WILL NEED TO HAVE ENABLED BIDIRECTIONAL SOFT MODE IN BLHELI SUITE (OR Bidirectional Mode in Bluejay v0.20.1rc2 or Newer!) ON YOUR ESC’S BEFORE USING THIS PRESET. NOT CONFIGURING YOUR ESC BEFORE TESTING COULD BE DANGEROUS IF THE MACHINE HAS PROPS ON, ALWAYS TEST AND VERIFY MOTOR SPIN DIRECTIONS AND YOUR SWITCHES/MODES WHILE THE PROPELLERS ARE OFF! I TAKE NO RESPONSIBILITY FOR YOU NOT HEEDING THIS WARNING.
#$ INCLUDE: presets/4.5/tune/defaults.txt
#$ INCLUDE: presets/4.3/filters/defaults.txt

#$ OPTION_GROUP BEGIN: 3D options

    #$ OPTION BEGIN (CHECKED): 3D setup
        feature 3D
        set min_check = 1005
        set max_check = 1995
        set 3d_deadband_low = 1499
        set 3d_deadband_high = 1501
        set 3d_neutral = 1500
        set 3d_deadband_throttle = 3
        set deadband = 3
        set yaw_deadband = 3
    #$ OPTION END
    
    #$ OPTION BEGIN (UNCHECKED): Remove 3D setup
        #$ INCLUDE: presets/4.5/other/reset_3d.txt
    #$ OPTION END

#$ OPTION_GROUP END

# -- Gyro lowpass filters --
set simplified_gyro_filter_multiplier = 110

# -- Gyro Dynamic Notches --
set dyn_notch_count = 1
set dyn_notch_max_hz = 450

# -- Dterm filtering --
set simplified_dterm_filter_multiplier = 90
simplified_tuning apply


# -- RPM filtering --
set rpm_filter_fade_range_hz = 100
set rpm_filter_harmonics = 2

# -- Misc --
set anti_gravity_gain = 100
set tpa_breakpoint = 1500

# -- PIDsum limits --
set pidsum_limit = 1000
set pidsum_limit_yaw = 1000



#$ OPTION_GROUP BEGIN: Dshot and Bidirectional RPM
    
    #$ OPTION BEGIN (CHECKED): Bidirectional RPM
        set dshot_bidir = ON
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED): Dshot600
        set motor_pwm_protocol = DSHOT600
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): Dshot300
        set motor_pwm_protocol = Dshot300
    #$ OPTION END

#$ OPTION_GROUP END

#$ OPTION BEGIN (UNCHECKED): Dynamic idle 3500rpm
    #dynamic idle for 3500rpm
    set dyn_idle_min_rpm = 35
#$ OPTION END

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

#$ OPTION BEGIN (CHECKED): Arm at any angle
    set small_angle = 180
#$ OPTION END

#$ OPTION_GROUP BEGIN: 4s tune

    #$ OPTION BEGIN (CHECKED): set to profile 1
        profile 0
        set profile_name = 4s
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED): auto set 4s tune
        set auto_profile_cell_count = 4
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED):4s tune
        set thrust_linear = 30
        set simplified_pids_mode = RP
        set simplified_master_multiplier = 160
        set simplified_i_gain = 75
        set simplified_dmax_gain = 0
        set simplified_feedforward_gain = 75
        simplified_tuning apply
    #$ OPTION END
#$ OPTION_GROUP END
    
#$ OPTION_GROUP BEGIN: 5s tune

    #$ OPTION BEGIN (CHECKED): set to profile 2
        profile 1
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED): auto set 5s tune
        set auto_profile_cell_count = 5
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED):5s tune
        set thrust_linear = 30
        set simplified_pids_mode = RP
        set simplified_master_multiplier = 145
        set simplified_i_gain = 85
        set simplified_d_gain = 90
        set simplified_dmax_gain = 80
        set simplified_feedforward_gain = 80
        simplified_tuning apply
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: 6s tune

    #$ OPTION BEGIN (CHECKED): set to profile 3
        profile 2
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED): auto set 6s tune
        set auto_profile_cell_count = 6
    #$ OPTION END
    
    #$ OPTION BEGIN (CHECKED):6s tune
        set thrust_linear = 15
        set simplified_pids_mode = RP
        set simplified_master_multiplier = 110
        set simplified_i_gain = 110
        set simplified_d_gain = 95
        set simplified_dmax_gain = 65
        set simplified_feedforward_gain = 110
        set simplified_dterm_filter_multiplier = 110
        simplified_tuning apply
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: Some popular RC Links

    #$ OPTION BEGIN (UNCHECKED): Crossfire/ELRS 50hz
        # Crossfire/ELRS 50Hz
        
        feature RX_SERIAL
        set serialrx_provider = CRSF

        #$ INCLUDE: presets/4.3/rc_link/generic/50hz_freestyle.txt
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): DJI SBUS fast
        # DJI SBUS fast

        #$ INCLUDE: presets/4.3/rc_link/DJI_SBUS_Fast.txt
    #$ OPTION END
    
    #$ OPTION BEGIN (UNCHECKED): ELRS 250hz
        # ELRS 250Hz
       
        feature RX_SERIAL
        set serialrx_provider = CRSF

         #$ INCLUDE: presets/4.3/rc_link/generic/250hz_freestyle.txt
    #$ OPTION END
    
        #$ OPTION BEGIN (UNCHECKED): ELRS 500hz
        # ELRS 500Hz
       
        feature RX_SERIAL
        set serialrx_provider = CRSF

         #$ INCLUDE: presets/4.3/rc_link/generic/500hz_freestyle.txt
    #$ OPTION END
    
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: ZoeFPV 3D rate bomb
    #$ OPTION BEGIN (UNCHECKED): Zoes rates
        #$ INCLUDE: presets/4.5/rates/ZoeFPV_3D_rates.txt
    #$ OPTION END

#$ OPTION_GROUP END
