Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void velocityDrive()
- {
- frontLeftDrive.setVelocity(frontLeftPower*2600);
- frontRightDrive.setVelocity(frontRightPower*2600);
- backLeftDrive.setVelocity(backLeftPower*2600);
- backRightDrive.setVelocity(backRightPower*2600);
- }
- frontLeftDrive.setVelocityPIDFCoefficients(1.20, 0.126, 0, 12.6);
- frontRightDrive.setVelocityPIDFCoefficients(1.20, 0.126, 0, 12.6);
- backLeftDrive.setVelocityPIDFCoefficients(1.20, 0.126, 0, 12.6);
- backRightDrive.setVelocityPIDFCoefficients(1.20, 0.126, 0, 12.6);
- /**
- * Sets drivetrain zero power behavior to brake
- */
- public void setBrake ()
- {
- robot.frontLeftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
- robot.frontRightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
- robot.backLeftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
- robot.backRightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
- }
- /**
- * Sets drivetrain zero power behavior to float
- */
- public void setFloat ()
- {
- robot.frontLeftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
- robot.frontRightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
- robot.backLeftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
- robot.backRightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement