Ejemplo n.º 1
0
        public Cannon()
        {
            angleMotor.SetNeutralMode(NeutralMode.Brake);
            angleMotor.ConfigPeakOutputForward(0.5f);
            angleMotor.ConfigPeakOutputReverse(-0.5f);
            angleMotor.ConfigSelectedFeedbackSensor(FeedbackDevice.Analog);
            angleMotor.ConfigSelectedFeedbackCoefficient(1.0f);
            angleMotor.Config_kP(0.001f);

            revolverMotor.SetInverted(true);
            revolverMotor.SetNeutralMode(NeutralMode.Brake);
            revolverMotor.ConfigPeakOutputForward(0.5f);
            revolverMotor.ConfigPeakOutputReverse(0.5f);

            revolverMotor.ConfigContinuousCurrentLimit(20);
            revolverMotor.ConfigPeakCurrentLimit(0);
            revolverMotor.ConfigPeakCurrentDuration(0);
            revolverMotor.EnableCurrentLimit(true);

            _setpoint = Angle;
        }