![]() |
Driver Station for Autonomous
Apologies if this is misplaced or if this has been answered somewhere else, but are we allowed to use an analog sensor/input (specifically a potentiometer) on the driver station to choose autonomous modes? I'm currently understanding that we can't use any digital inputs to choose autonomous.
|
Re: Driver Station for Autonomous
Quote:
|
Re: Driver Station for Autonomous
You can read information from your DS (either analog or digital) during Autonomous/Disabled mode. During Autonomous/Enabled your DS will not pass inputs on to the cRIO.
See Team Update 9 for details of how the robots will be cycled through the various states during a match. |
Re: Driver Station for Autonomous
A very very simple way of choosing autonomous modes would be having a bank of switches in a safe place on your robot, and base your programming off whether or not any of those switches are turned on or off.
|
Re: Driver Station for Autonomous
You may read digital inputs, or analog inputs, on the DS to use in selecting autonomous modes. When the robot is enabled, these values will read as zero. What you do is read these values during each cycle of the disabledperiodic() call and save the computed mode in a static variable. You actually have to use two such variables because the inputs will be unreliable on the last disabledperiodic() call. Use the second variable to buffer the value computed in the prior call, and use this value in the autonomous periodic call.
Eugene |
Re: Driver Station for Autonomous
Ah.. So does that mean I should have two variables, an old variable and the new one, then check if the new one is zero. If it's zero, use the old variable, if it's not, replace the old with the new?
I wonder if that makes sense. Thanks all! |
| All times are GMT -5. The time now is 20:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi