01-13-2010 01:30 PM
I was just working through the default template code and noticed that the gyro is openned in Begin.vi, but closed in teleop.vi when the stop condition is activated.
This looks like it may be a problem during testing when teleop can be executed several times in a row without a reset.
The Gyro will be closed multiple times, without a corrosponding Open each time.
I recommend moving this gyro close action into the finish.vi
note: I don't know whether the GyroClose does anything that will prevent the gyro from working or not, but the implication is that it will.
It does close the underlying analog input.
Phil.
01-14-2010 11:29 AM
Hi Phil,
Good catch! You should go ahead and delete the Gyro Close VI from the Stop Case in the Teleop VI. This will invalidate the Gyro reference on successive calls to the Teleop VI during the same instance of Robot Main. It's not a problem in competition because you go from Autonomous to Teleop and your done, but I can see it being painful during testing.
The Gyro reference is already properly closed in the Finish VI, so all you need to do is delete the Gyro Close from the Teleop VI and you should be good to go.
Best Regards,
~Nate
01-14-2010 02:02 PM
Will this fix be in the next LabVIEW update?
01-14-2010 05:34 PM
Hi Sciencewhiz,
This specific problem may not warrent a full LabVIEW FRC update to be released, but if a further update is released, the fix for this issue will be included.
Best Regards,
~Nate