예제 #1
0
        /// <summary>
        /// Create a Pigeon object that communciates with Pigeon through the Gadgeteer ribbon
        /// cable connected to a Talon on CAN Bus.
        /// </summary>
        /// <param name="talonSrx"> Talon SRX object that Pigeon is connected to.</param>
        public PigeonImu(CTRE.TalonSrx talonSrx)
        {
            _deviceId = (UInt32)0x02000000 | talonSrx.GetDeviceNumber();

            CTRE.Native.CAN.Send(CONTROL_1 | _deviceId, 0x00000000, 0, 100);

            _ParamContainer = new ParamContainer(_deviceId, PARAM_REQUEST, PARAM_RESPONSE, PARAM_SET);
        }
예제 #2
0
        /// <summary>
        /// Create a Pigeon object that communicates with Pigeon on CAN Bus.
        /// </summary>
        /// Pigeon must be connected to CANBus and external 12V power.
        /// <param name="deviceNumber"> CAN Devcie Id of Pigeon.</param>
        public PigeonImu(int deviceNumber)
        {
            _deviceId = 0x15000000 | (UInt32)deviceNumber;

            CTRE.Native.CAN.Send(CONTROL_1 | _deviceId, 0x00000000, 0, 100);

            _ParamContainer = new ParamContainer(_deviceId, PARAM_REQUEST, PARAM_RESPONSE, PARAM_SET);
        }