I'm not sure if the title really explains what I'm talking about.
Rather than abrupt acceleration and deceleration, my team thought that it would be better if we went in increments, increasing speed on every iteration of the main loop.
I sort of have an idea of the GET functions in the Jaguar, but are there any kind of SET functions that would allow for me to explicitly change the rpm?
This is more or less of my pseudocode as of now, if this helps my rather horrid explanation/request.
Code:
#include "WPILib.h"
int oldX = 0;
CANJaguar::CANJaguar LPort = new CANJaguar::CANJaguar;
CANJaguar::CANJaguar RPort = new CANJaguar::CANJaguar;
global int currentX = Joystick::GetX(PORT);
global double speed = (6 * pi) * CANJaguar::GetSpeed();
while(true)
{
if(currentX>oldX)
{
//Accel
}
else if(currentX < oldX)
{
//Decel
}
oldX = currentX;
}