/// <summary>
 /// This function is run when the robot is first started up and should be
 /// used for any initialization code.
 /// </summary>
 public override void RobotInit()
 {
     chooser = new SendableChooser();
     chooser.AddDefault("Default Auto", defaultAuto);
     chooser.AddObject("My Auto", customAuto);
     SmartDashboard.PutData("Chooser", chooser);
 }
 public override void RobotInit()
 {
     driver     = new Drive();
     controller = new Control();
     indexers   = new Indexers();
     chooser    = new SendableChooser();
     chooser.AddDefault("Default Auto", defaultAuto);
     chooser.AddObject("My Auto", customAuto);
     SmartDashboard.PutData("Chooser", chooser);
 }
Example #3
0
        /// <summary>
        /// This function is run when the robot is first started up and should be
        /// used for any initialization code.
        /// </summary>
        public override void RobotInit()
        {
            chooser = new SendableChooser();
            chooser.AddDefault("Default Auto", defaultAuto);
            chooser.AddObject("My Auto", customAuto);
            SmartDashboard.PutData("Chooser", chooser);

            //create joystick and robotdrive objects for joystick input and motor control
            stick = new Joystick(0);
            drive = new RobotDrive(0, 1, 2, 3);
        }
Example #4
0
        public override void RobotInit()
        {
            oi = new OI();

            Robot.GearManipulator.Close();

            chooser = new SendableChooser();
            chooser.AddDefault("Default Auto", new Commands.Autonomous());
            //chooser.AddObject("My Auto", new MyAutoCommand);
            SmartDashboard.PutData("Chooser", chooser);
        }
Example #5
0
        public override void RobotInit()
        {
            Console.WriteLine("Hello, FRC2017!");
            Console.WriteLine("TrueMoe RobotCode 2017i");
            chooser = new SendableChooser();
            chooser.AddDefault("Default Auto", defaultAuto);
            chooser.AddObject("My Auto", customAuto);
            SmartDashboard.PutData("Chooser", chooser);

            usbCamera          = new UsbCamera("USB Camera 0", 0);
            mjpegServer        = new MjpegServer("USB Camera 0 Server", 1181);
            mjpegServer.Source = usbCamera;

            driveCtl   = new drivingControl();
            operateCtl = new operatingControl();
            opIf       = new operatorInterface();
        }
Example #6
0
        public override void TeleopPeriodic()
        {
            Scheduler.Instance.Run();
            Joystick stick = Oi.Pilot;
            //train._drive.ArcadeDrive(1, 1);

            stick.SetRumble(RumbleType.LeftRumble, stick.GetRawAxis(XboxMap.LeftTrigger));
            stick.SetRumble(RumbleType.RightRumble, stick.GetRawAxis(XboxMap.RightTrigger));

            SmartDashboard.PutNumber("POV", Oi.Pilot.GetPOV(0));
			SmartDashboard.PutString("Drive Mode", Oi.DriveStyle.ToString());
			SmartDashboard.PutString("Gear", Oi.ShifterGear.ToString());

            SmartDashboard.PutData("Compressor On", new CompressorOnCommand());
            SmartDashboard.PutData("Compressor Off", new CompressorOffCommand());

            Air.Update();
            Match.Update();
            Power.Update();

        }
Example #7
0
 /// <summary>
 /// This function is run when the robot is first started up and should be
 /// used for any initialization code.
 /// </summary>
 public override void RobotInit()
 {
     chooser = new SendableChooser();
     chooser.AddDefault("Default Auto", defaultAuto);
     chooser.AddObject("My Auto", straightAuto);
     chooser.AddObject("Left Auto", leftAuto);
     SmartDashboard.PutData("Chooser", chooser);
     //start cameras?
     CameraServer.Instance.StartAutomaticCapture(0);
     CameraServer.Instance.StartAutomaticCapture(1);
     //create joystick and robotdrive objects for joystick input and motor control
     stick              = new Joystick(0);
     drive              = new RobotDrive(0, 1, 2, 3);
     climber            = new VictorSP(4);
     getRope            = new VictorSP(5);
     flag               = '\0';
     testTime           = new System.Timers.Timer(50);
     elapsed            = true;
     elapsedTimes       = 0;
     testTime.AutoReset = false;
     testTime.Elapsed  += TimeAlert;
 }