View Single Post
  #1   Spotlight this post!  
Unread 01-31-2011, 06:22 PM
architek501 architek501 is offline
Registered User
FRC #0501
 
Join Date: Jan 2011
Location: New Hampshire
Posts: 3
architek501 is an unknown quantity at this point
Re: Ps3/360 controller with robot programmed in Java

Quote:
Originally Posted by ProgrammerMatt View Post
S
tilt foward back side side would be 2
If I were using a PS3 controller, that would definitely be the case.

Code:
    public static int getDPad1( )
    {
        return 6;
    }
This is a snippet of code I'm using in a config file that is imported into our main robot code, referenced here:

Code:
if ( opControl.getRawAxis( ControllerConfig.getDPad1( ) ) >= 0.03 )
            {
                System.out.println( "This is Axis #6." );
            }
In this case, when the robot is running in teleoperated mode, and the D-Pad is pressed to the right, it prints "This is Axis #6." This is placeholder code, but it's apparent that if I try to create and call a 7th axis, it won't work. I just want to know if there's some sort of workaround so I can use the Up-Down axis of the D-Pad.
Reply With Quote