public void Setup() { _tal.ConfigFwdLimitSwitchNormallyOpen(true); _tal.ConfigRevLimitSwitchNormallyOpen(true); _tal.SetControlMode(ControlMode.kVoltage); //voltage control mode _tal.SetFeedbackDevice(TalonSrx.FeedbackDevice.CtreMagEncoder_Relative); //sensor type _tal.SetStatusFrameRateMs(TalonSrx.StatusFrameRate.StatusFrameRatePulseWidthMeas, 1); //feedback to 1ms }
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); }