Go to Post Its always reassuring to share a design with a respected, competitive and veteran team. - Adama [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-30-2009, 11:47 AM
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
New class for Logitech Dual Action Gamepad

Wildstang is using the Logitech Dual Action Gamepad for our manipulator this year so I "borrowed" the gamepad class that 1114 released as part of the beta project (thanks guys ) for some early testing. I quickly realized that it didn't give access to the D-pad and the left analog stick at the same time since the joystick class they derived from only gives access to four controller axes at once. You have to press the "Mode" button to swap between the D-pad and the left analog stick. Since we want to use both at the same time, I wrote my own class that interfaces directly with the DriverStation class, just like the provided Joystick class does. I didn't bother to add GetLeftTrigger() or similar methods because we won't be using those, but they should be simple for you to add if you need them.

I figured that since most of the code in the new class was pieced together from code in the WPILib Joystick class and the Simbot's LogitechGamepad class, the fair thing to do is release it to everyone. I wouldn't have been able to create this class as quickly and easily without using both of those classes as references.

The code is fairly well tested and it should work fine since it's very simple stuff, but if you find any bugs or make improvements, please post them here.
Attached Files
File Type: zip Gamepad.zip (1.6 KB, 290 views)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
define a new class(C++) nadavsen2 C/C++ 15 11-02-2010 01:21 PM
pic: 716 Dual Motor/Dual Speed CD47-Bot Robot Showcase 18 04-23-2004 01:51 AM
White Paper Discuss: Dual-motor, dual-speed gearbox CD47-Bot Extra Discussion 8 04-05-2004 07:24 PM
White Paper Discuss: Dual-motor, dual-speed drive transmission design CD47-Bot Extra Discussion 9 09-03-2003 10:40 AM
Gamepad Controller Mike375 Technical Discussion 13 03-05-2002 09:20 PM


All times are GMT -5. The time now is 10:54 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