|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Autonomous
Does your team have three autonomous modes for each starting position on the field?
|
|
#2
|
||||
|
||||
|
Re: Autonomous
yall have inputs on your Driver Station correct. Can yall tell me how to program these when my team finally relizes that we need a few of those
![]() |
|
#3
|
||||
|
||||
|
Re: Autonomous
The DriverStation class has GetDigitalIn() and GetAnalogIn() functions to return those inputs. However, if you're trying to set up autonomous mode selector switches you're going to need to put them on the robot itself (connected to a digital sidecar) instead of using the DS.
|
|
#4
|
|||||
|
|||||
|
Re: Autonomous
No, you can use the Driver Station's inputs to select autonomous behavior. You just have to read them before Autonomous Mode begins, and save the values for use during Autonomous. (That means supplying your own RobotMain() procedure, I think.)
|
|
#5
|
||||
|
||||
|
Re: Autonomous
Quote:
![]() |
|
#6
|
||||
|
||||
|
Re: Autonomous
Quote:
Code:
class RobotDemo: public SimpleRobot
{
DriverStation *ds;
int pos;
public:
RobotDemo()
{
ds = DriverStation::GetInstance();
if (ds->Get...
//switch code here and assign pos 1,2, or 3
}
void Autonomous()
{
switch(pos)
{
case 1:
Auto1();
...
}
}
void Auto1()
{
}
void Auto2()
{
}
void Auto2()
{
}
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autonomous | Rafi Ahmed | Rules/Strategy | 13 | 08-01-2007 01:34 |
| Autonomous | hedgehogger | Programming | 1 | 22-01-2004 18:29 |
| Autonomous | danielkitchener | Rumor Mill | 3 | 03-01-2004 01:08 |
| R.A.G.E. Autonomous? | DarkJedi613 | Regional Competitions | 7 | 17-03-2003 21:33 |
| Autonomous | Jestin Hashop | Rules/Strategy | 2 | 11-02-2003 19:24 |