Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How to determine controller type (http://www.chiefdelphi.com/forums/showthread.php?t=134504)

jfitz0807 13-02-2015 13:50

How to determine controller type
 
We only have one XBox controller so we have to use another controller type for our practice bot. We want to keep a single code base that will work on both. Is there a good way to query a Joystick to determine what type of controller it is?

rich2202 13-02-2015 13:54

Re: How to determine controller type
 
Quote:

Originally Posted by jfitz0807 (Post 1443377)
We only have one XBox controller so we have to use another controller type for our practice bot. We want to keep a single code base that will work on both. Is there a good way to query a Joystick to determine what type of controller it is?

Use your smart dashboard, and have an input (check box?) for which controller.

MrRoboSteve 13-02-2015 14:10

Re: How to determine controller type
 
Can you use the Get___Count() methods on the Joystick to distinguish between the two at runtime?

rich2202 13-02-2015 14:14

Re: How to determine controller type
 
The x-box controller is part of the Driver's Station as does not have to be bagged.

We use the same DS and Controller for both practice and production bot.


All times are GMT -5. The time now is 01:49.

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