Go to Post Volunteer...it will make you see a totally different side of FIRST. - Collin Fultz [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2011, 18:22
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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi