This should work, but as I don't have a bot with TalonSRXs, I can't confirm this, but you could try it. I have used the IterativeRobot class.
Code:
class Robot: public IterativeRobot
{
private:
LiveWindow *lw;
CANTalon leftFront = new CANTalon(1);
CANTalon leftBack = new CANTalon(5);
CANTalon rightFront = new CANTalon(2);
CANTalon rightBack = new CANTalon(6);
RobotDrive drive = new RobotDrive(leftFront, leftBack, rightFront, rightBack);
Joystick stick = new Joystick(1);
Gyro gyro = new gyro(0);
void RobotInit()
{
lw = LiveWindow::GetInstance();
}
void AutonomousInit()
{
}
void AutonomousPeriodic()
{
}
void TeleopInit()
{
}
void TeleopPeriodic()
{
drive.MecanumDrive_Cartesian(stick.getX(), stick.getY(), stick.getThrottle(), gyro.getAngle());
}
void TestPeriodic()
{
lw->Run();
}
};