CyberCoyotes / 2023-ChargedUp

Code repository for the 2023 FRC season. We are using Java (command based) for programming. On the hardware side we are using a RobioRio2, MK4 inverted swerve drive modules, primarily Falcon motors, and a Pigeon 2 gyro.
Other
1 stars 0 forks source link

Are we reading the encoder correctly on SmartDashboard #92

Closed JediScoy closed 9 months ago

JediScoy commented 1 year ago

Current code Subsystem code

References

https://www.chiefdelphi.com/t/talon-ctre-encoder-values/164553 https://v5.docs.ctr-electronics.com/en/stable/ch14_MCSensor.html

CTRE Documentation

https://store.ctr-electronics.com/content/api/java/html/enumcom_1_1ctre_1_1phoenix_1_1motorcontrol_1_1_feedback_device.html#ae1e33b53cdb902cda8a8ae6be3ebfcc5

com.ctre.phoenix.motorcontrol.FeedbackDevice.PulseWidthEncodedPosition =(8);

com.ctre.phoenix.motorcontrol.FeedbackDevice.CTRE_MagEncoder_Absolute =(8)

JediScoy commented 1 year ago

Extension Subsystem

m_motorController.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute); VS. m_motorController.configSelectedFeedbackSensor(FeedbackDevice.Pulse);

JediScoy commented 1 year ago

It seems like Pulse vs CTRE_MagEncoder_Absolute are the same?