Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Driver Station for Autonomous (http://www.chiefdelphi.com/forums/showthread.php?t=75192)

shrimp 24-02-2009 20:46

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.

billbo911 24-02-2009 22:43

Re: Driver Station for Autonomous
 
Quote:

Originally Posted by shrimp (Post 827508)
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.

As far as I know, you can use either analog or digital inputs on the DS. I don't know of any rules limiting that. In fact, we will be adding a switch to our DS as insurance. What I mean by that is that we already have our code set to receive our alliance info from the FMS. That way it will automatically target the correct color set. The switch will be coded in if the FMS, for some odd reason, does not provide the information that the new vi's are looking for.

Vikesrock 24-02-2009 23:10

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.

computerboi1503 24-02-2009 23:13

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.

eugenebrooks 25-02-2009 00:46

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

shrimp 03-03-2009 17:05

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