Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Controller inputs resetting? (http://www.chiefdelphi.com/forums/showthread.php?t=112637)

ctccromer 02-02-2013 19:26

Controller inputs resetting?
 
Today our buttons and axes randomly changed themselves for the SECOND TIME. Long story short, we had placed the whole electrical system and motors and everything on the robot temporarily. Today was our day to take it all off and put it back on (in somewhat different laces), but permanently this time.

After this, almost everything on the controller (logitech controller) simply made the robot turn left... I redeployed the SAME CODE that *should* have been on the cRIO and most of it works the same as it did. the X button (button 3) is still a little messy, but it could be that our window motor isnt powered correctly. There's still a lot we need to look into. Today was a frustrating day for the whole team..

But anyways.. has anyone had issues with a logitech controller (seemingly) randomly reassigning button maps??

bvisness 02-02-2013 19:28

Re: Controller inputs resetting?
 
The first thing that comes to mind is that you have the joysticks configured in the wrong order. Check the Setup tab of your driver station to make sure. Besides that, I'm not sure what could cause your problem.

ctccromer 02-02-2013 19:29

Re: Controller inputs resetting?
 
Quote:

Originally Posted by bvisness (Post 1226622)
The first thing that comes to mind is that you have the joysticks configured in the wrong order. Check the Setup tab of your driver station to make sure. Besides that, I'm not sure what could cause your problem.

I'll doublecheck the setup tab monday, but we only have one joystick (it counts the whole controller as 1), and it was plugged into the same USB port I always use

EDIT: I love your team name! Legitimately made me laugh out loud

bvisness 02-02-2013 19:32

Re: Controller inputs resetting?
 
Oh. I suppose that's not your problem then. :P

If your code hasn't changed, and you've been messing with the electronics, then I would guess that the controller is not your problem.

ctccromer 02-02-2013 23:10

Re: Controller inputs resetting?
 
Quote:

Originally Posted by bvisness (Post 1226624)
Oh. I suppose that's not your problem then. :P

If your code hasn't changed, and you've been messing with the electronics, then I would guess that the controller is not your problem.

Its not that obvious either. For example, I traced the pwm wires THREE times. I know 100% without a doubt that they were plugged in the right slot, facing the right way. Yet the button that used to turn PWM 7 ("Shooter Arm") now turns PWM 5 ("Shooter Motor 1"). But Pwm 5 and 6 (Shooter Motors 1 and 2) worked with the same buttons as before. Except Pwm 5 went backwards.

Theres a lot that just doesn't make any sense. The CIM at pwm 5 might have the power cables backwards which would explain the backwards spinning, but everything else, i don't have a clue

Alan Anderson 03-02-2013 00:57

Re: Controller inputs resetting?
 
What model of Logitech game controller are you using? Does it perhaps have a switch on the underside that changes its axis and button mapping?

Greg McKaskle 03-02-2013 07:36

Re: Controller inputs resetting?
 
I think Alan has it. Somewhere on the controller there is usually a button, I think they call it mode. It toggles between two different mappings of POV and axes. The drivers know nothing about and can't inform you that the joystick is in the wrong mode.

Greg McKaskle

ctccromer 03-02-2013 10:53

Re: Controller inputs resetting?
 
Quote:

Originally Posted by Alan Anderson (Post 1226814)
What model of Logitech game controller are you using? Does it perhaps have a switch on the underside that changes its axis and button mapping?

Yes it has X and D on the back. While one (i dont remember which) was far worse than the other, they were both very different from what they should have been according to the code and previous button mapping tests.

I'm using the Logitech F310 controller

I know it matters which PWM slot you plug motor controllers into, but does it matter which slot on the PDB you plug the motors into? I don't think it does, but IF it does, that could very well have caused it

Greg McKaskle 03-02-2013 11:08

Re: Controller inputs resetting?
 
The PDB circuits excluding the ones on the end for the cRIO, camera, and radio are interchangeable provided they have the right breaker installed. The SW knows nothing about them and they are not SW controlled.

Greg McKaskle

Mark McLeod 03-02-2013 11:12

Re: Controller inputs resetting?
 
I think the F310 also has a mode button on the top.

Xinput is what you want to start with, not DirectInput.

ctccromer 03-02-2013 12:20

Re: Controller inputs resetting?
 
Quote:

Originally Posted by Mark McLeod (Post 1226916)
I think the F310 also has a mode button on the top.

Xinput is what you want to start with, not DirectInput.

yep. We keep it on X and we keep the mode light off, though the only thing mode USED TO change (no idea now) was one axis

Kusha 03-02-2013 12:34

Re: Controller inputs resetting?
 
One problem that we had was that tested code would suddenly start malfunctioning. 3 out of 4 drive motors started running on their own when they worked before. Our shooter wouldn't run and our spike/compressor would not work. After debugging we found out it was the ribbon cable that goes from the c-rio to the sidecar, suddenly everything was working again.

I hope this helps, if not then good luck.

ctccromer 03-02-2013 13:42

Re: Controller inputs resetting?
 
Quote:

Originally Posted by Kusha (Post 1226945)
After debugging we found out it was the ribbon cable that goes from the c-rio to the sidecar, suddenly everything was working again..

I'll be sure to check this monday, thanks

bvisness 03-02-2013 16:28

Re: Controller inputs resetting?
 
Quote:

Originally Posted by Mark McLeod (Post 1226916)
Xinput is what you want to start with, not DirectInput.

Really? We have always found that DirectInput (D) works far better for us than Xinput. (As for the Mode button, that only switches the functions of the + pad and the left analog stick. You should probably keep the Mode light off.)

Alan Anderson 03-02-2013 18:32

Re: Controller inputs resetting?
 
We found using DirectInput gave us access to all the functions on our fancy gamepads last year, while Xinput mapped some of the shoulder buttons as axes that weren't supported by the Driver Station.

The PS2 game controllers we're using this year have a mode button that needs to be on in order for them to work right. With it off, one of the thumbsticks and half the buttons don't do anything we can detect.


All times are GMT -5. The time now is 02:14.

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