Ejemplo n.º 1
0
        public void Setup()
        {
            TalonSrx armTalon = (TalonSrx)_gearBox.GetMaster();

            armTalon.SetStatusFrameRateMs(TalonSrx.StatusFrameRate.StatusFrameRateGeneral, 10);       //Send updates every 10ms instead of 10ms
            armTalon.SetStatusFrameRateMs(TalonSrx.StatusFrameRate.StatusFrameRatePulseWidthMeas, 1); //1ms update insead of 100ms for encoder
            armTalon.SetSensorDirection(true);                                                        //reversed sensor
            armTalon.ConfigFwdLimitSwitchNormallyOpen(false);
            armTalon.ConfigRevLimitSwitchNormallyOpen(false);
            armTalon.EnableZeroSensorPositionOnReverseLimit(false); //enable on reverse limit
            armTalon.EnableZeroSensorPositionOnForwardLimit(false);
        }