Quote:
Originally Posted by Kevin Watson
but I don't see where this could cause a ploblem as the OI data from the previous Getdata() should be valid. What problem were you having?
|
Here's the deal. When the robot powers up in teleop, as is normal outside of competition, the first routine of ours that gets called is teleop_init, before (at least originally) the first call to getdata (except for the getdata before initialization, which I suspect doesn't include OI data).
We were grabbing some switch values in teleop_init into a static variable to detect when/if the operator changes those switches during the normal teleop(). We do this to avoid moving some of our appendages on first power up until someone at the control panel asks them to move (safety considerations).
Since telop_init() was only invoked once, before the first (real) getdata, we didn't see the real OI switches and concluded that the operator had, in fact, moved them when teleop got called after the getdata invocation.
Thanks for considering the changes, and check out my next post. It's going to point out another 26.2msec issue in this same area of the code.
Lynn (D) - Team Voltage 386 Software