#$ TITLE: AOS Cine40 tune by Chris Rosser
#$ FIRMWARE_VERSION: 2026.6
#$ CATEGORY: TUNE
#$ STATUS: COMMUNITY
#$ KEYWORDS: aos, chris, rosser, pid, tune, cine, 40
#$ AUTHOR: Chris Rosser
#$ DISCUSSION: https://www.aos-rc.com
#$ DESCRIPTION: Custom Tune for the AOS Cine40. Based on a 1100mAh 6S build with 2000KV Motors.
#$ DESCRIPTION:
#$ DESCRIPTION: Master multiplier is set to 1.0 for safety. Increase it carefully to further improve flight performance.
#$ DESCRIPTION:
#$ DESCRIPTION: RPM filtering is MANDATORY!
#$ DESCRIPTION:
#$ DESCRIPTION: Please carefully review the options above and tick any that are relevant.
#$ DESCRIPTION:
#$ DESCRIPTION: Choose your RC link. CRSF links follow the detected packet rate automatically.
#$ DESCRIPTION:
#$ FORCE_OPTIONS_REVIEW: TRUE

#$ INCLUDE: presets/2026.6/tune/defaults.txt

# -- PID values --

set p_pitch = 61
set i_pitch = 110
set d_pitch = 40
set f_pitch = 0
set p_roll = 47
set i_roll = 84
set d_roll = 30
set f_roll = 0
set p_yaw = 47
set i_yaw = 84
set f_yaw = 0
set d_max_pitch = 40
set thrust_linear = 20
set simplified_pi_gain = 105
set simplified_d_max_gain = 0
set simplified_feedforward_gain = 0
set simplified_pitch_d_gain = 120
set simplified_pitch_pi_gain = 125

# -- iTerm relax (default)--
# -- iTerm windup (default)--
# -- iTerm rotation (off, default) --

# -- Dmax --
set d_max_advance = 0

# -- TPA --

# -- Feedforward --
set feedforward_max_rate_limit = 95

# -- PIDsum limits (default)--
# -- Antigravity (default) --
# -- Absolute control (off, default) --
# -- Accecleration limits (off, default) --
# -- Angle and Horizon mode tuning (default) --
# -- PIDs active below min throttle (default) --
# -- Set mixer type to default (legacy) --
# -- Set yaw spin recovery to default, which is auto --
# -- Set integrated yaw to off, so pitch and yaw are independent (default) --
# -- Gyro cal on first arm (off, default) --
# -- Transient throttle limit (off, default) --
# -- Thrust linear (off, default) --
# -- Throttle boost (default, 5)
# -- VBat warning threshold --

# -- DShot Idle --
set motor_idle = 300

# -- Dynamic idle ON at 4500 rpm --
set dyn_idle_min_rpm = 45
set dyn_idle_p_gain = 40


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

# -- Filters --

#$ OPTION_GROUP BEGIN: Filters
    #$ OPTION BEGIN (CHECKED): AOS Filters (Recommended)
        #$ INCLUDE: presets/2026.6/filters/aos_rc/aos_cine40_filters.txt
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): 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

# -- Motors --

#$ OPTION_GROUP BEGIN: Motor Settings
    #$ OPTION BEGIN (UNCHECKED): DShot Motor Beeping (Recommended)
        beacon RX_LOST
        beacon RX_SET
        set beeper_dshot_beacon_tone = 3
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): 14 pole motors (Most 21mm motors have 14 poles )
        set motor_poles = 14
    #$ OPTION END

#$ OPTION_GROUP END

# -- Rates --

#$ OPTION_GROUP BEGIN: Rates
    #$ OPTION BEGIN (UNCHECKED): Cinematic Rates (Recommended)
        set roll_rc_rate = 4
        set pitch_rc_rate = 4
        set yaw_rc_rate = 4
        set roll_srate = 40
        set pitch_srate = 40
        set yaw_srate = 40
    #$ OPTION END

#$ OPTION_GROUP END

# -- Fast Rx Link Options --

#$ OPTION_GROUP BEGIN (EXCLUSIVE): Choose your RC link (or apply another preset separately)
    #$ OPTION BEGIN (UNCHECKED): CRSF - ExpressLRS, Crossfire or Tracer (Recommended)
        #$ INCLUDE: presets/2026.6/rc_link/crsf/crsf_auto.txt
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): CRSF - fixed 50Hz
        #$ INCLUDE: presets/2026.6/rc_link/crsf/crsf_50hz.txt
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): DJI Normal
        #$ INCLUDE: presets/2026.6/rc_link/dji/DJI_Normal.txt
    #$ OPTION END

    #$ OPTION BEGIN (UNCHECKED): DJI SBUS FAST
        #$ INCLUDE: presets/2026.6/rc_link/dji/DJI_SBUS_Fast.txt
    #$ OPTION END
#$ OPTION_GROUP END

# -- Recommended options --

#$ OPTION_GROUP BEGIN: Check all of these (recommended)

    # -- VBat sag compensation --
    #$ OPTION BEGIN (CHECKED): Full battery sag compensation
        set vbat_sag_compensation = 100
        set vbat_sag_lpf_period = 2
    #$ OPTION END

    # -- Stick behaviour --
    #$ OPTION BEGIN (UNCHECKED): No stick deadband
        set deadband = 0
        set yaw_deadband = 0
    #$ OPTION END

    # -- Startup and arming --
    #$ OPTION BEGIN (UNCHECKED): Arm at any angle
        set small_angle = 180
    #$ OPTION END

    # -- Prop direction --
    #$ OPTION BEGIN (UNCHECKED): Props out (check motor direction!)
        set yaw_motors_reversed = ON
    #$ OPTION END

#$ OPTION_GROUP END

simplified_tuning apply