We are working with CANJaguar for the first time, and we are sort of lost. We have the motors themselves spinning, but we can't seem to control them as we want to. We're in PercentVBus mode, and we are using the regular old set function (we pass it a value between -1 and 1 using the axes on our gamepad). Instead of moving the motor at the speed that is specified, though, it gradually approaches that speed.
Here is a rough outline of our code, just highlighting stuff relating to the CANJags:
Code:
cjag(12, CANJaguar::kPercentVbus), // This is in the constructor for our drivetrain class
// Settings
cjag.SetPID(0.4, 0.005, 0);
cjag.ConfigEncoderCodesPerRev(200);
cjag.SetSpeedReference(CANJaguar::kSpeedRef_Encoder);
cjag.EnableControl();
// Moving
cjag.Set(gamepad.GetY());