Go to Post In theory, we do not need teachers in this world because we have the written word, but in reality, teachers are one of the most valuable resources, if not the most valuable resource, we have. - Natchez [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 13-02-2015, 10:40
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 82
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Pneumatics, getting XBox input

The issue is that you need to change
Code:
if(XboxController.button[0] == true)
to
Code:
if(XboxController.button[0].get() == true)
The key change there being the addition of ".get()". What your code is doing is saying "If this button is true, run my code". A button won't be equal to true because it's a Button, not a boolean. Using "XboxController.button[0].get()" changes that line of code to "If this button's STATE is true (pressed), run my code". This should fix your problem.
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:31.

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