|
Re: Using encoder with talon SRX
set() and setPosition() do not do the same thing. set() changes the setpoint of the motor (make it go to 7530 counts, etc.), while setPosition() "zeroes" the encoder, keeping the setpoint the same. For example, setPosition(0) redefines the current encoder position to be 0. However, if the previous setpoint was 7350 before zeroing, it will auto-correct to the new 7350 (7350 counts ahead of where the old 7350 used to be).
__________________
My FRC History:
2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division
2017 - Team 5817: Return of the bench grinder
|