Yesterday my team and I were doing some testing on our robot. We already have the robot drive code written (4 motor tank) and we have tested that out before. We just ran another test to see if everything was going fine. When we ran the code, the right side at our robot spun at 100% power backwards (-1) while the right side was silent. (this is at joystick equilibrium). I never scaled the joystick values in my code. I probed the wires coming out of the joystick axis get, and found they were all messed up. The right joystick was at -1, and the left was at 0.03 (that was fine though). I restarted the robot and switched the order of the joysticks, and something wierder happened. The new rightside default was at .3, and the left side was at -.4. (no code was changed since the last run). I restarted the robot a third time, and switched around the joysticks, and they were both correctly scaled, but inverted. They stayed that way for the rest of the night (for as long as I know). any ideas why this happened?
Wow that sounds freakish…
I know this isn’t very helpful but you should try it on the simplest code to see if it’s a hardware issue or not…
You can try reading from the joysticks on a super-simple VI that just runs on your computer (function pallette–>connectivity–>input devices) without all the FRC software.
Good luck,
Noam
MisCar 1574
thanks for the idea, i’ll try that today.
One of the dirty little secrets for HID joysticks is that they autocenter when the connection is made. Depending on the situation, that could be shortly after they are plugged in, it could be when the program is started, it could be when F1 is pressed.
Anyway, you will leave the joystick with a bias if you have it off center in these situations. This seems easier to do with gamepads than big joysticks.
Does that possibly explain your symptoms?
Greg McKaskle
One of the dirty little secrets for HID joysticks is that they autocenter when the connection is made. Depending on the situation, that could be shortly after they are plugged in, it could be when the program is started, it could be when F1 is pressed.
Anyway, you will leave the joystick with a bias if you have it off center in these situations. This seems easier to do with gamepads than big joysticks.
Does that possibly explain your symptoms?
Greg McKaskle
thank you. that makes sense, but it still doesn’t explain the change in joystick default when i restarted the robot and kept everything the way it was.