diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RobotAutoDriveByEncoder_Linear.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RobotAutoDriveByEncoder_Linear.java index 4c27fe0..354b006 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RobotAutoDriveByEncoder_Linear.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RobotAutoDriveByEncoder_Linear.java @@ -82,13 +82,13 @@ public class RobotAutoDriveByEncoder_Linear extends LinearOpMode { // For example, use a value of 2.0 for a 12-tooth spur gear driving a 24-tooth spur gear. // This is gearing DOWN for less speed and more torque. // For gearing UP, use a gear ratio less than 1.0. Note this will affect the direction of wheel rotation. - static final double COUNTS_PER_MOTOR_REV = 1440 ; // eg: TETRIX Motor Encoder + static final double COUNTS_PER_MOTOR_REV = 537.6 ; // eg: TETRIX Motor Encoder static final double DRIVE_GEAR_REDUCTION = 1.0 ; // No External Gearing. - static final double WHEEL_DIAMETER_INCHES = 4.0 ; // For figuring circumference + static final double WHEEL_DIAMETER_INCHES = 3.77953 ; // For figuring circumference static final double COUNTS_PER_INCH = (COUNTS_PER_MOTOR_REV * DRIVE_GEAR_REDUCTION) / (WHEEL_DIAMETER_INCHES * 3.1415); - static final double DRIVE_SPEED = 0.6; - static final double TURN_SPEED = 0.5; + static final double DRIVE_SPEED = 0.2; + static final double TURN_SPEED = 0.4; @Override public void runOpMode() { @@ -131,8 +131,8 @@ public class RobotAutoDriveByEncoder_Linear extends LinearOpMode { // Step through each leg of the path, // Note: Reverse movement is obtained by setting a negative distance (not speed) encoderDrive(DRIVE_SPEED, 48, 48, 5.0); // S1: Forward 47 Inches with 5 Sec timeout - encoderDrive(TURN_SPEED, 12, -12, 4.0); // S2: Turn Right 12 Inches with 4 Sec timeout - encoderDrive(DRIVE_SPEED, -24, -24, 4.0); // S3: Reverse 24 Inches with 4 Sec timeout + //encoderDrive(TURN_SPEED, 12, -12, 4.0); // S2: Turn Right 12 Inches with 4 Sec timeout + //encoderDrive(DRIVE_SPEED, -24, -24, 4.0); // S3: Reverse 24 Inches with 4 Sec timeout telemetry.addData("Path", "Complete"); telemetry.update();