Skip to content

Commit bbfde2e

Browse files
Fixed feedback sensor source when switching between remote and local feedbacks.
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
1 parent cf732d6 commit bbfde2e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

yams/java/yams/motorcontrollers/remote/TalonFXSWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ public boolean applyConfig(SmartMotorControllerConfig config)
802802
"withExternalEncoderGearing(Rotations.of(1.0))");
803803
}
804804

805+
m_talonConfig.ExternalFeedback.ExternalFeedbackSensorSource = ExternalFeedbackSensorSourceValue.Commutation;
805806
m_talonConfig.ExternalFeedback.RotorToSensorRatio = 1.0;//config.getGearing().getRotorToMechanismRatio();
806807
m_talonConfig.ExternalFeedback.SensorToMechanismRatio = config.getGearing().getMechanismToRotorRatio();
807808
// Zero offset.

yams/java/yams/motorcontrollers/remote/TalonFXWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ public boolean applyConfig(SmartMotorControllerConfig config)
756756
"withExternalEncoderGearing(Rotations.of(1.0))");
757757
}
758758

759+
m_talonConfig.Feedback.FeedbackSensorSource = FeedbackSensorSourceValue.RotorSensor;
759760
m_talonConfig.Feedback.RotorToSensorRatio = 1.0;
760761
m_talonConfig.Feedback.SensorToMechanismRatio = config.getGearing().getMechanismToRotorRatio();
761762

0 commit comments

Comments
 (0)