Skip to content

Commit

Permalink
Add note about RotorToSensorRatio for custom TalonFX module impleme…
Browse files Browse the repository at this point in the history
…ntation
  • Loading branch information
jwbonner committed Dec 26, 2024
1 parent ef1f0a8 commit 6e92f64
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 6e92f64

Please sign in to comment.