Quote:
Originally Posted by JackVaughn23
Good morning, this is my first post to this forum so please bear with me. We are using a motor with an encoder on it connected to a CanTalonSRX. I am able to set values for the motor, but I am not able to get any values from the encoder. When I read the manual (CrossTheRoads) for the CanTalonSRX all of the methods that are using in the examples are for a CanTalon and not the CanTalonSRX. I can use the CanTalon methods to "set" items but anything I try to "get" it always returns a value of 0. When I look at the WPILib documentation for Java for CanTalonSRX all of the methods require arguments to be passed to the function that I have no clue what they are. For example,
GetCurrent(SWIGTYPE_p_double param)
I'm not sure what argument the method is wanting.
But on the other hand, the methods for a CANTalon are incredibly simple and most require no arguments and I would really love to use those methods if they would work with the SRX (the CrossTheRoad manual only examples CANTalon methods for use with the SRX).
Any help would be greatly appreciated, I apologize in advance if I left out any details needed.
|
You want to use the CANTalon class. CANTalonSRX is a lower level implementation that is made available, but isn't needed in most cases.
Omar... feel free to jump in here and correct me if the Java implementation is different than C++.