View Single Post
  #3   Spotlight this post!  
Unread 10-02-2012, 15:59
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Declaring Second Joystick

Code:
class MyRobot: public SimpleRobot
{
    Joystick stick1;
    Joystick stick2;
 
    MyRobot(): stick1(1),
               stick2(2)
    {
    }
    ...
    void OperatorControl()
    {
        if (stick1.GetRawButton(1))
        {
        }
        else if (stick2.GetRawButton(1))
        {
        }
    }
};
__________________

Last edited by mikets : 10-02-2012 at 16:04.
Reply With Quote