= configs.TalonFXConfiguration() \
.with_motor_output(configs.MotorOutputConfigs() \
.with_neutral_mode(signals.NeutralModeValue.COAST)
)\
.with_feedback(configs.FeedbackConfigs() \
.with_feedback_remote_sensor_id(encoder) \
.with_feedback_sensor_source(signals.FeedbackSensorSourceValue.REMOTE_CANCODER)
)\
.with_current_limits(configs.CurrentLimitsConfigs() \
.with_stator_current_limit_enable(True) \
.with_stator_current_limit(40)
)\
.with_slot0(configs.Slot0Configs() \
.with_k_s(0.19505) \
.with_k_v(0.11845) \
.with_k_a(0.0017884) \
.with_k_g(0) \
.with_k_p(53.449/2) \
.with_k_d(0.38955)
)\
.with_motion_magic(configs.MotionMagicConfigs() \
.with_motion_magic_acceleration(20 * gearRatio * 3) \
.with_motion_magic_cruise_velocity(2 * gearRatio) \
.with_motion_magic_jerk(40 * gearRatio * 3)
)