View Single Post
  #3   Spotlight this post!  
Unread 14-01-2009, 19:00
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Wondering if anyone else is having an issue with Joysticks

You don't have to declare them like this
Code:
Joystick *left_stick, *right_stick;
left_stick  = Joystick::GetStickfromPort(1);
right_stick = Joystick::GetStickfromPort(2);
You can do the same like this:
Code:
Joystick left_stick(1);//type joystick, variable name left_stick, port 1
Joystick right_stick(2);
Reply With Quote