Go to Post Woah, boulders fired. - FrisbeeFunTime [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 02-14-2016, 12:08 PM
imatrain's Avatar
imatrain imatrain is offline
Lead Programmer
FRC #4576 (Red Nation Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Tennessee
Posts: 1
imatrain is an unknown quantity at this point
Does anyone have examples of how Joystick triggers work this year?

We've been trying to figure out how to use the triggers on our xbox controller to control our shooter, but have so far had no luck in actually getting them to work. If anyone has any examples of code with triggers they could share with us it would be greatly appreciated
Reply With Quote
  #2   Spotlight this post!  
Unread 02-14-2016, 12:51 PM
wazateer1 wazateer1 is offline
Registered User
FRC #3506 (YETI Robotics)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2013
Location: Charlotte, NC
Posts: 30
wazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to beholdwazateer1 is a splendid one to behold
On the driver station software there are multiple tabs on the left. Clicking through them you will find a list of joysticks connected to the computer that are compatible with the driver station software. When you press a button on the controller you want to configure, one of the controllers in the list should turn green. Click that one, and you will be able to see an interface that lists every button and axis available on your computer. Now you can pull the triggers, and see which axis/button is being triggered. If a light turns green, then the triggers act as a button and you need to count down to see which button it is. If one of the axis moves, you can use Joystick.getAxis(axisNumber) to get the value. Hope this helps!
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 07:28 AM.

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