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
m_driveStick = new Joystick(1, 5, 8)
/*
* Where 1 is the USB port number, 5 is the number of axes,
* and 8 is the number of buttons.
*/
to create this Joystick object.
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.
I’ll have to check when I get my hands on it again tomorrow but I think that will explain our mysterious ‘axes changing their indexing’ issues. I had forgotten about that switch since the Logitech RumblePad 2 that I own and tend to use for at home testing doesn’t have one. Thanks
Actually, yes I would. Since our team doesn’t use controllers with vibration functions, it’s been on the back burner but I would like to try it out for my testing controller
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.
Thanks, I’m doing more coding this year than last since I’m adjusting our code to fit the new Command Based Robot template since it seems like it’ll be easier to update in the future than my current code so I don’t have as much time for the projects like the vibration controller.
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.