robotpy / robotpy-wpilib

Moved to https://github.com/robotpy/mostrobotpy
https://robotpy.github.io
Other
169 stars 59 forks source link

Misleading documentation CANTalon.getSensorPosition -> getPosition #192

Closed shipshupe closed 8 years ago

shipshupe commented 8 years ago

Hi,

Our Team (2605) was implementing an integral velocity mode and using the CANTalon documentation to poll the position on the encoder. The documentation suggests using the getSensorPosition() for 20ms update rate but the implementation wrapper seems to actually be getPosition()?

https://robotpy.readthedocs.org/en/latest/wpilib/CANTalon.html " Once you do that you can use getSensorPosition() and getSensorVelocity(). These signals are updated on CANBus every 20ms (by default). If a relative sensor is selected, you can zero (or change the current value) using setSensorPosition()."

https://github.com/robotpy/robotpy-wpilib/blob/0c34cfb19ee71edbf5f5a2f939765a190b815aec/wpilib/wpilib/cantalon.py#L735

Thanks for all you do, it's been great to work with the students using Python!

virtuald commented 8 years ago

Yep, sounds like a documentation bug. Glad you've enjoyed using python! Don't forget to add yourself to the community list!