I’m having problems with getting the closed loop velocity control to work. I am using a CTRE Mag encoder and it is wired up properly. The code that I am using is exactly from the examples that are on the ctre github for example code. What is happening is that when button 1 is held and I move the joystick, the motor goes full speed and even if the joystick is at the zero position the motor will continue to move at full speed. Another thing I noticed was that if I was holding button one, started the motor with the joystick, let go of the button, and then hit the button again the motor would start back up. The motor had to be completely at rest for it to reset. Am I doing something wrong? Is this a bug? Please
help
Initialization of the talon:
https://drive.google.com/file/d/0B9NrgpUBgu6ILTV3VkZyMWRkXzQ/view?usp=sharing
Code that runs the talon:
https://drive.google.com/file/d/0B9NrgpUBgu6IdE1ZUEN5QTQwbUE/view?usp=sharing