Skip to content

Commit

Permalink
Merge pull request #29 from ftc16072/outreach
Browse files Browse the repository at this point in the history
made a drive only method in robot for outreach stuff
  • Loading branch information
Joshua-Smith-42 authored Nov 22, 2024
2 parents 40b5074 + 635003b commit c337112
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class ScoreArm extends QQMechanism{
public static final double TEST_SPEED = 0.55;
public static final int CLAW_RELEASE_OFFSET = 50;
public static final int CLAW_RELEASE_OFFSET = 150;
DcMotor leftMotor;
DcMotor rightMotor;
TouchSensor limitSwitch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public boolean isClawOpen() {
return false;
}


public boolean isBlockGrabbable() {
if (colorSensor.getDistance(DistanceUnit.CM) < GRABBABLE_DISTANCE_CM) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
@TeleOp()
public class FieldRelativeDrive extends QQOpMode{

@Override
public void init(){
robot.makeDriveOnly();
super.init();
}

@Override
public void loop() {
nav.driveFieldRelative(-gamepad1.left_stick_y,gamepad1.left_stick_x,gamepad1.right_stick_x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class Robot {

public ScoreArm scoreArm;

boolean driveOnly;


List<QQMechanism> mechanisms;

Expand Down Expand Up @@ -71,6 +73,12 @@ public void update(Telemetry telemetry){
}
}

public void makeDriveOnly(){
mechanisms = Arrays.asList(
controlHub,
mecanumDrive);
}

public List<QQMechanism> getMechanisms() {
return mechanisms;
}
Expand Down

0 comments on commit c337112

Please sign in to comment.