#$ TITLE: FrSky Sbus or FPort
#$ FIRMWARE_VERSION: 2025.12
#$ CATEGORY: RC_LINK
#$ STATUS: OFFICIAL
#$ KEYWORDS: frsky, sbus, fport, 9ms, 111hz, rc, link, smoothing
#$ AUTHOR: ctzsnooze
#$ DESCRIPTION: RC link settings for a 111Hz / 9ms D16 with FrSky Sbus or FPort link.
#$ DESCRIPTION: WARNING: make sure that the OpenTx or EdgeTx Hardware ADC Filter is un-checked!
#$ DESCRIPTION: Use a recent version of OpenTx / EdgeTx with good module sync.
#$ DESCRIPTION: Note: Telemetry requires smartPort (s.Port) and does not convey RSSI (use Lua or analog RSSI).
#$ FORCE_OPTIONS_REVIEW: TRUE

#$ INCLUDE: presets/2025.12/rc_link/defaults.txt

# IMPORTANT: Bound in D16 with more than 8 channels = too slow for racing

# Base setup:
feature RX_SERIAL
set feedforward_averaging = OFF
set feedforward_jitter_factor = 8
set frsky_vfas_precision = 1
set tlm_inverted = OFF
set tlm_halfduplex = ON

#$ OPTION_GROUP BEGIN: (EXCLUSIVE) Sbus or FPort (choose only one)
    #$ OPTION BEGIN (UNCHECKED): Sbus
        set serialrx_provider = SBUS
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): FPort
        set serialrx_provider = FPORT
        set serialrx_inverted = ON
        set serialrx_halfduplex = ON
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: (EXCLUSIVE) Fine-tuning...
    #$ OPTION BEGIN (UNCHECKED): Race
        set feedforward_jitter_factor = 6
        set rc_smoothing_auto_factor = 25
        set rc_smoothing_auto_factor_throttle = 20
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Freestyle
        set feedforward_jitter_factor = 8
        set rc_smoothing_auto_factor = 50
        set rc_smoothing_auto_factor_throttle = 50
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): HD Freestyle
        set feedforward_jitter_factor = 12
        set rc_smoothing_setpoint_cutoff = 25
        set rc_smoothing_throttle_cutoff = 20
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Cinematic
        set feedforward_jitter_factor = 14
        set rc_smoothing_setpoint_cutoff = 12
        set rc_smoothing_throttle_cutoff = 20
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Ultra Cinematic
        set feedforward_jitter_factor = 16
        set rc_smoothing_setpoint_cutoff = 6
        set rc_smoothing_throttle_cutoff = 20
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: Metric or Imperial units
    #$ OPTION BEGIN (UNCHECKED): Metric
        set frsky_unit = metric
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Imperial
        set frsky_unit = imperial
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: Hardware options
    #$ OPTION BEGIN (UNCHECKED): Telemetry inverted (default is not inverted)
        set tlm_inverted = ON
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Full duplex telemetry (default is half duplex)
        set tlm_halfduplex = OFF
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): Bound with >8 channels (not recommended)
        set feedforward_averaging = 2_POINT
    #$ OPTION END
#$ OPTION_GROUP END

#$ OPTION_GROUP BEGIN: (EXCLUSIVE) Select Receiver UART
    #$ OPTION BEGIN (UNCHECKED): UART 1
        serial UART1 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 2
        serial UART2 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 3
        serial UART3 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 4
        serial UART4 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 5
        serial UART5 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 6
        serial UART6 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 7
        serial UART7 64 115200 57600 0 115200
    #$ OPTION END
    #$ OPTION BEGIN (UNCHECKED): UART 8
        serial UART8 64 115200 57600 0 115200
    #$ OPTION END
#$ OPTION_GROUP END
