Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Xbox One controller feedback? (http://www.chiefdelphi.com/forums/showthread.php?t=125164)

Invictus3593 24-01-2014 13:53

Xbox One controller feedback?
 
Our team has used Xbox 360 controllers for 4 years, but I'm curious to see if anyone is using an Xbox One controller via the USB cable? If so, have you looked into using the trigger "rumble"?

I don't think this would add any real functionality, but it would be an interesting side project to add some rumble in the XB1 Controller triggers when you shoot the ball or rumble either controller based on how fast you were driving.

Is this possible with any of the languages we are allowed to use now?

Chris_Ely 24-01-2014 14:10

Re: Xbox One controller feedback?
 
As of right know, Microsoft has not released drivers for Windows for the Xbox One controller.

cgmv123 24-01-2014 16:40

Rumble functions on any controller are not supported by WPILib and the Driver Station

Invictus3593 24-01-2014 19:22

Re: Xbox One controller feedback?
 
Quote:

Originally Posted by cgmv123 (Post 1331796)
Rumble functions on any controller are not supported by WPILib and the Driver Station


Alan Anderson 26-01-2014 12:47

Re: Xbox One controller feedback?
 
Quote:

Originally Posted by cgmv123 (Post 1331796)
Rumble functions on any controller are not supported by WPILib and the Driver Station

Keep in mind that the Driver Station is just one program. You are able -- and even encouraged -- to run your own Dashboard software alongside it. It should be possible to use advanced joystick/gamepad features from your own code.

eddie12390 26-01-2014 12:58

Re: Xbox One controller feedback?
 
It's not currently possible to use an XBox One controller on Windows so that's out of the question.

Right now we're using a PS3 Controller connected with a Micro-USB cable using MotionInJoy and I like it a lot. Having the joysticks be not be at separate heights on the controller makes things like tank drive feel a lot more natural and I prefer the feel of the PS3 controller overall.

Invictus3593 26-01-2014 17:32

Re: Xbox One controller feedback?
 
Quote:

Originally Posted by Alan Anderson (Post 1332699)
Keep in mind that the Driver Station is just one program. You are able -- and even encouraged -- to run your own Dashboard software alongside it. It should be possible to use advanced joystick/gamepad features from your own code.

So, if I wrote a third-party program to rumble the controller while the dashboard was running (because I seriously doubt the LabVIEW Dashboard we're using can rumble the controller), how would I send the signal from the LabVIEW dashboard to this separate process?

Also, wouldn't using gamepad functions in another program while using the same gamepad in the DS cause problems?

Alan Anderson 26-01-2014 21:48

Re: Xbox One controller feedback?
 
Quote:

Originally Posted by Invictus3593 (Post 1332813)
...I seriously doubt the LabVIEW Dashboard we're using can rumble the controller...

LabVIEW can invoke any DLL function or ActiveX control that you want. Look in the Connectivity function palette.

Quote:

Also, wouldn't using gamepad functions in another program while using the same gamepad in the DS cause problems?
I don't know whether the Driver Station takes exclusive control of the HID devices it finds. If it turns out that you can't use an input device simultaneously in both the DS and another program, you can have your program send to the robot whatever gamepad input data you like. The DS doesn't have to be the only conduit for driver control.

gerry 27-01-2014 01:23

Re: Xbox One controller feedback?
 
so its my third year programming and ive never done xbox 360 controllers the most complicated thing that ive ever done was a six cim drive train so i wanted to know if someone could tutorial me on programing a xbox 360 controller using the left thumbstick for movement forwards and backwards and the right thumstick for movement right and left and the right trigger for acceleration forward and the left trigger for backward acceleration
i know itll be difficult but i wanted a challenge and now im second guessing myself
and need tons of help !!!!

Invictus3593 27-01-2014 18:45

Re: Xbox One controller feedback?
 
Quote:

LabVIEW can invoke any DLL function or ActiveX control that you want. Look in the Connectivity function palette
I've been trying to do just that. This is the C# code I was able to successfully get the controller to vibrate:
Code:

PlayerIndex controller = new PlayerIndex();

if (checkBox1.Checked == true)
{
    GamePad.SetVibration(controller, 1, 1);
}
else
{
    GamePad.SetVibration(controller, 0, 0);
}

But, as you can see, the SetVibration method requires three parameters: (PlayerIndex playerIndex, float left, float right)

I can use the .net construct node to get the Microsoft.Xna.Framework.PlayerIndex controller with this code:

but I don't know how to invoke the method SetVibration, since it is only a method in Microsoft.Xna.Framework.Input.Gamepad which has no constructors.


Quote:

so its my third year programming and ive never done xbox 360 controllers the most complicated thing that ive ever done was a six cim drive train so i wanted to know if someone could tutorial me on programing a xbox 360 controller using the left thumbstick for movement forwards and backwards and the right thumstick for movement right and left and the right trigger for acceleration forward and the left trigger for backward acceleration
i know itll be difficult but i wanted a challenge and now im second guessing myself
and need tons of help !!!!
Do a quick search here on CD for "Xbox layout". You'll find some good resources on which digital axis corresponds to the physical joystick. From there, you can figure out which axis is needed for which function.


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

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