/** * ****************************** * * <p>Configures motors: - Sets which side is inverted - Configures the secondary motors to be in * follow mode - Sets ramp rate * * <p>****************************** */ private void setupMotors() { leftMotor1.setInverted(invertLeft); leftMotor2.setInverted(invertLeft); rightMotor1.setInverted(invertRight); rightMotor1.setInverted(invertRight); leftMotor2.changeControlMode(CANTalon.TalonControlMode.Follower); leftMotor2.set(leftMotor1.getDeviceID()); rightMotor2.changeControlMode(CANTalon.TalonControlMode.Follower); rightMotor2.set(rightMotor1.getDeviceID()); leftMotor1.setVoltageRampRate(RAMP_RATE); rightMotor1.setVoltageRampRate(RAMP_RATE); }
@Override public TalonSRX setVoltageRampRate(double rampRate) { talon.setVoltageRampRate(rampRate); return this; }