From 6e92f6442f73af626ae7459cb5479f731f0ea724 Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Wed, 25 Dec 2024 21:01:29 -0500 Subject: [PATCH] Add note about `RotorToSensorRatio` for custom TalonFX module implementation --- .../template-projects/talonfx-swerve-template.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docs/getting-started/template-projects/talonfx-swerve-template.md b/docs/docs/getting-started/template-projects/talonfx-swerve-template.md index bb76f66a..1cdcfde4 100644 --- a/docs/docs/getting-started/template-projects/talonfx-swerve-template.md +++ b/docs/docs/getting-started/template-projects/talonfx-swerve-template.md @@ -286,7 +286,13 @@ By default, the project uses a CANcoder in remote/fused/sync mode. When using an turnConfig.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.RotorSensor; ``` -3. Reset the relative encoder position at startup: +3. Replace `RotorToSensorRatio` with `SensorToMechanismRatio` as shown below: + +```java +turnConfig.Feedback.SensorToMechanismRatio = constants.SteerMotorGearRatio; +``` + +4. Reset the relative encoder position at startup: ```java tryUntilOk(5, () -> turnTalon.setPosition(customEncoder.getPositionRotations(), 0.25));