Go to Post Just a modest request for folks NOT to put 3000-pixel-wide pictures inline in the forum. A link to the big picture works just as well while keeping the text readable. Thanks. - Rick TYler [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 31-01-2015, 16:51
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: Xbox Axis Help

Quote:
Originally Posted by kinganu123 View Post
Use the driver station to find the raw axis values of the individuals joysticks (it's on one of the tabs on the bottom left hand side). Then, just call getRawAxis() on that axis you find.
Also, I'm sure if you look around on chiefdelphi, you'll find that people have already posted up their xbox class.
Could I use this picture http://team358.org/files/programming...rolMapping.jpg for the values or do I need to check the actual readings?

Code:
 boolean buttonPressedForwardSpike = false; // these are in init.
   
    boolean buttonPressedForwardVictor = false; // init

            if (xbox.getRawAxis(5)) {  // 5 being the Y axis on right stick
            	
            	spike1.set(Relay.Value.kForward);
            	spike2.set(Relay.Value.kForward);
            	buttonPressedForwardSpike = true;
            	
            	
            } else if (buttonPressedForwardSpike = true) {
            	
            	spike1.set(Relay.Value.kOff);
            	spike2.set(Relay.Value.kOff);
            	buttonPressedForwardSpike = false;
            }
Reply With Quote
 


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 22:25.

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