|
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
|