Read up on the documentation for different objects. You need to create objects for the different things you are using, then you need to define where they are plugged in, then just implement them in the operator control. I would suggest reading up, look in this folder for documentation
C:\windriver\docs\extensions\FRC\
here is an example adapted from the simple robot example:
Code:
class RobotDemo : public SimpleRobot
{
RobotDrive* myRobot; // robot drive system
Joystick* m_leftStick;
Joystick* m_rightStick;
public:
RobotDemo(void)
{
GetWatchdog().SetExpiration(100);
//candidates are RobotDrive( LeftFront, LeftRear, RightFront, RightRear);
myRobot = new RobotDrive(1,3,2,4); //adapt to what yours are
m_leftStick = new Joystick(1); //once again adapt these to what you have
m_rightStick = new Joystick(2);
}
void Autonomous(void)
{
while (IsAutonomous())
{
GetWatchdog().Feed();
//auton code here
}
}
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())
{
GetWatchdog().Feed();
myRobot->TankDrive(m_leftStick, m_rightStick);
}
}
};