![]() |
How do I code for a more complex joystick?
Our team is using two Logitech Gamepad F310's for our drivers station this year. We did use one last year and I think that I instantiated it correctly then however, on occasion I had strange errors concerning which axis did what. I'm simply asking if there's a better way than
Code:
m_driveStick = new Joystick(1, 5, 8)Also, as far as I can tell, the left and right triggers on this controller are simply + and - on the same axis. For some reason this way just seems...overly complex but I can't seem to come up with a method to simplify it that doesn't appear to add other unnecessary complexity. |
Re: How do I code for a more complex joystick?
I think that that game controller has a switch underneath that changes the way the triggers are mapped. Does switching it help?
|
Re: How do I code for a more complex joystick?
Quote:
|
Re: How do I code for a more complex joystick?
Hmm, haven't encountered that. On another note, would you like to get the rumble to rumble? :D
|
Re: How do I code for a more complex joystick?
Quote:
|
Re: How do I code for a more complex joystick?
I did the code back in 2010 and haven't touched it since. Let me test it then I'll send it over. It uses the output from the gyro, but I was thinking of using it this year with a piezio vibration sensor I saw online. I'll get back to you.
|
Re: How do I code for a more complex joystick?
Quote:
|
Re: How do I code for a more complex joystick?
Quote:
|
Re: How do I code for a more complex joystick?
Here try this.
http://www.techtigers.com/ResourceFi.../EngXInput.rar From the robot code I was using this to send the angle of the gyro: float angle = 0; angle = (m_HeadingGyro.GetAngle()); m_TechTigerDashBoard.AddCluster(); m_TechTigerDashBoard.AddDouble(angle); m_TechTigerDashBoard.FinalizeCluster(); you will receive the heading in the dashboard and I would multiply it by a very high number to in a sense make the gyro super sensitive and in essence using the gyro as a bump sensor and shaking the joystick. I made several dlls that used directx and what not. If the EngXInput.dll does not work on your joystick let me know and I will send the other ones. But if I remember correctly, this one worked with most joysticks. |
Re: How do I code for a more complex joystick?
Quote:
|
| All times are GMT -5. The time now is 17:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi