예제 #1
0
        //is that ; supposed to be there?

        private LED()
        {
            lightie_boies = Robotmap.GETCANController();

            // H-Hewo?? somewon pwease hewlp me
            // I'm havwing a wittle bit of twobule figuwring out what to do next 3;
        }
예제 #2
0
        private Deliver() //constructor same name as class name
        {                 //Defining the servo
            Robotmap map = Robotmap.GetInstance();

            deliverServo   = Robotmap.GETCANController();
            m_currentState = DELIVERSTATE.HoldBalls;
        }
예제 #3
0
        public RCRadio3Ch(CANifier canifier)
        {
            _canifier = canifier;

            _canifier.SetStatusFramePeriod(CANifierStatusFrame.Status_3_PwmInputs0, 8, 100);
            _canifier.SetStatusFramePeriod(CANifierStatusFrame.Status_4_PwmInputs1, 8, 100);
            _canifier.SetStatusFramePeriod(CANifierStatusFrame.Status_5_PwmInputs2, 8, 100);
            _canifier.SetStatusFramePeriod(CANifierStatusFrame.Status_6_PwmInputs3, 8, 100);
        }
예제 #4
0
        // Create/Return CANifier Singleton
        public static CANifier GETCANController()
        {
            Robotmap map = Robotmap.GetInstance();

            if (m_canifier == null)
            {
                m_canifier = new CANifier((ushort)map.GetCANIFIER_ID());
            }
            return(m_canifier);
        }
예제 #5
0
        private FlagGrabber()

        {
            Robotmap theWholeShabang = Robotmap.GetInstance();

            CANController = Robotmap.GETCANController();
            CANController.EnablePWMOutput((int)theWholeShabang.GetFlagGrabberServo_ID(), true); //move servo

            m_currentState = FlagGrabberSTATE.GRABBER_OPEN;
        }
예제 #6
0
        private Transfer()
        {
            Robotmap map = Robotmap.GetInstance();

            transferMotor = new TalonSRX(map.GetTransfer_ID()); //Creates the motor
            transferMotor.SetInverted(true);

            CANController = Robotmap.GETCANController(); //Creates the first sensor

            numberOfBalls = 0;                           //The original amount of balls

            glowing = LED.GetInstance();

            m_currentState = TRANSFER_STATE.TRANSFER_OFF;
            eject          = Intake.GetInstance();
        }
예제 #7
0
        private Chassis()
        {
            Robotmap map = Robotmap.GetInstance();

            //Constants for variables to use
            left_motor = new TalonSRX(map.GetLeftDrive_ID());
            left_motor.SetNeutralMode(NeutralMode.Brake);
            left_motor.SetInverted(true); // Can invert the direction the motors are moving

            right_motor = new TalonSRX(map.GetRightDrive_ID());
            right_motor.SetNeutralMode(NeutralMode.Brake);
            right_motor.SetInverted(false);                      // Can invert the direction the motors are moving

            drive_assister = new PigeonIMU(map.Get_ID_Pigeon()); //TODO Get real name of pigeon from Christina

            bumper_switch = Robotmap.GETCANController();
        }