Autonomous

Does your team have three autonomous modes for each starting position on the field?

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

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.

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

Yes, and we are happy too that we didn’t have to make dip switches for the different modes directly on our robot this year. :slight_smile:

no, you can say something like this:

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()
        {

        }
}