|
Re: Problems with cRIO and driving while competing
Looking at the code, the first project looks exactly like the template code. Did you have issues driving with the default code?
The other project has one point that looks funny to me. The catapult motor is being controlled in two parallel loops. If the logic is consistent, then this shouldn't be a problem, but it clearly allows for funky interactions if the logic or drivers are doing things the programmers didn't expect.
I searched to see if anyone else is updating the X or Y globals. I didn't see any in the code that was posted. So I don't think this is causing any issues. Another way to do this is simply to read the joystick in the periodic loop.
So at this point, I don't see anything obvious. Can you point out periods in the log file or with specific mechanisms that were problematic? Perhaps I'm not looking at the correct logs?
Greg McKaskle
|