![]() |
Pneumatics, getting XBox input
Hey, I am from Team 5676 and we have some problems with the programming. I looked in some pneumatic threads, but I didn't found anything similar.
We want to work with pneumatics who get controlled by the Xbox controller. When the XBox controller and all the buttons are defined, what is the best way to get the Xbox Input to let the pneumatics start working? Code:
if(XboxController.button[0] == true)with best wishes The Hornets |
Re: Pneumatics, getting XBox input
Quote:
Code:
For example: Code:
// if 5 is bigger than 4 will evaluate to trueCode:
public void toggleSolenoid1() { |
Re: Pneumatics, getting XBox input
The issue is that you need to change
Code:
if(XboxController.button[0] == true)Code:
if(XboxController.button[0].get() == true) |
Re: Pneumatics, getting XBox input
This is something my team is using
Code:
if (DriverButtons.X.changedDown)but if do not want a toggle then you can easily do Code:
if (DriverButtons.X.current) |
Re: Pneumatics, getting XBox input
Quote:
A few common ones include Code:
if (leftStick.getRawButton(5)) {} // if the button is held(or true) it would run the code |
Re: Pneumatics, getting XBox input
Thank you all so much!!! So we changed all this staff but I just donīt get it to read the buttons. It tells me that XboxController.button would not be visible. But itīs all declared as public and the XboxController and the buttons are all imported. Any suggestions or ideas???
|
| All times are GMT -5. The time now is 22:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi