예제 #1
0
파일: Program.cs 프로젝트: E-Fv1/Fall20FTC
        public static void Main()
        {
            /* Start Init */

            //robotInit();

            CTRE.Phoenix.MotorControl.CAN.TalonSRX driveTalon1 = new CTRE.Phoenix.MotorControl.CAN.TalonSRX(0);
            CTRE.Phoenix.MotorControl.CAN.TalonSRX driveTalon2 = new CTRE.Phoenix.MotorControl.CAN.TalonSRX(0);

            CTRE.Phoenix.Controller.GameController gamepad =
                new CTRE.Phoenix.Controller.GameController(new CTRE.Phoenix.UsbHostDevice(0));
            CTRE.Phoenix.Controller.GameControllerValues gv = new CTRE.Phoenix.Controller.GameControllerValues();

            gamepad.GetAllValues(ref gv);

            Intake   intake   = new Intake();
            Conveyor conveyor = new Conveyor();
            Climber  climber  = new Climber();

            Drive drive = new Drive(driveTalon1, driveTalon2, gamepad);

            TeleopStateMachine tsm = new TeleopStateMachine(intake, conveyor, climber, gamepad);

            /* Start Auton */

            /* Start Teleop */

            /* simple counter to print and watch using the debugger */
            int counter = 0;

            /* loop forever */
            while (true)
            {
                /* print the three analog inputs as three columns */
                Debug.Print("Counter Value: " + counter);

                /* increment counter */
                ++counter; /* try to land a breakpoint here and hover over 'counter' to see it's current value.  Or add it to the Watch Tab */

                /* wait a bit */
                System.Threading.Thread.Sleep(100);

                //TeleopStateMachine.moveRight();
            }
        }