Quote:
Originally Posted by JewishDan18
Ok, I found the issue. Instead of doing something like this
Code:
jag2 = new CANJaguar(2);
jag2.changeControlMode(CANJaguar.ControlMode.kSpeed);
I had to do this
Code:
jag2 = new CANJaguar(2,CANJaguar.ControlMode.kSpeed);
I want to look into switching control modes, since I feel position control would be useful during autonomous, and speed would be used for teleoperated.
|
Ah yes... your symptoms reminded me of why your code did not work...
setPID() sets the PID constants for the control mode you are in. The original code you posted will work if you move setPID() below changeControlMode().
-Joe