コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ArcadeDrive"/> class.
        /// </summary>
        /// <param name="fl">The Front Left Motor.</param>
        /// <param name="fr">The Front Right Motor.</param>
        /// <param name="bl">The Back Left Motor.</param>
        /// <param name="br">The Back Right Motor.</param>
        /// <param name="xb">A instance of the Xbox Controller.</param>
        public ArcadeDrive(IMotor fl, IMotor fr, IMotor bl, IMotor br, XboxController xb)
        {
            _frontLeft = fl;
            _frontRight = fr;
            _backLeft = bl;
            _backRight = br;

            xbox = xb;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DriveMotorSet"/> class.
        /// </summary>
        /// <param name="_br">The _BR.</param>
        /// <param name="_bl">The _BL.</param>
        /// <param name="_fl">The _FL.</param>
        /// <param name="_fr">The _FR.</param>
        public DriveMotorSet(IMotor _br, IMotor _bl, IMotor _fl, IMotor _fr)
        {
            backLeft = _bl;
            backRight = _br;
            frontLeft = _fl;
            frontRight = _fr;

            backLeft.Inverted = true;
            frontLeft.Inverted = true;
        }