public void Setup() { TalonSRX armTalon = (TalonSRX)_gearBox.MasterMotorController; armTalon.SetInverted(false); armTalon.SetStatusFramePeriod(StatusFrame.Status_1_General_, 10); //Send updates every 10ms instead of 10ms armTalon.SetStatusFramePeriod(StatusFrameEnhanced.Status_8_PulseWidth, 1); armTalon.SetSensorPhase(true); //reversed sensor armTalon.ConfigForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyClosed); armTalon.ConfigReverseLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyClosed); armTalon.ConfigClearPositionOnLimitR(false, 10); //enable on reverse limit armTalon.ConfigClearPositionOnLimitF(false, 10); }
public void Setup() { _tal.ConfigForwardLimitSwitchSource(CTRE.Phoenix.MotorControl.LimitSwitchSource.FeedbackConnector, CTRE.Phoenix.MotorControl.LimitSwitchNormal.NormallyOpen); _tal.ConfigReverseLimitSwitchSource(CTRE.Phoenix.MotorControl.LimitSwitchSource.FeedbackConnector, CTRE.Phoenix.MotorControl.LimitSwitchNormal.NormallyOpen); _tal.ConfigSelectedFeedbackSensor(CTRE.Phoenix.MotorControl.FeedbackDevice.CTRE_MagEncoder_Relative); _tal.SetStatusFramePeriod(StatusFrameEnhanced.Status_8_PulseWidth, 1); }