Claw, Gantry, and Lift
This commit is contained in:
parent
cd9bf1f3f0
commit
a4ee7223c3
|
@ -50,7 +50,7 @@ public class MainTeleOp extends OpMode {
|
|||
boolean clawDown = gamepad2.a || clawDownSafe; // A
|
||||
|
||||
// Robot Drone Launch
|
||||
boolean robotDroneLaunch = gamepad1.right_bumper; // Change if Merck wants (RT)
|
||||
boolean robotDroneLaunch = gamepad1.left_bumper; // Change if Merck wants (LT)
|
||||
|
||||
// Robot Lift
|
||||
boolean robotLiftRotation = gamepad2.right_trigger > 0.05; // RT
|
||||
|
@ -121,6 +121,8 @@ public class MainTeleOp extends OpMode {
|
|||
|
||||
if (robotDroneLaunch) {
|
||||
this.robot.getDrone().raise();
|
||||
} else {
|
||||
this.robot.getDrone().reset();
|
||||
}
|
||||
// Robot Lift
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.firstinspires.ftc.teamcode.hardware;
|
||||
|
||||
import static org.firstinspires.ftc.teamcode.hardware.RobotConfig.DRONE_LAUNCH_POS;
|
||||
import static org.firstinspires.ftc.teamcode.hardware.RobotConfig.DRONE_ROTATION_UP_NAME;
|
||||
import static org.firstinspires.ftc.teamcode.hardware.RobotConfig.DRONE_STOW_POS;
|
||||
|
||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||
import com.qualcomm.robotcore.hardware.Servo;
|
||||
|
@ -14,7 +16,11 @@ public class Drone {
|
|||
}
|
||||
|
||||
public void raise() {
|
||||
this.droneLaunchServo.setPosition(0.2);
|
||||
|
||||
this.droneLaunchServo.setPosition(DRONE_LAUNCH_POS);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.droneLaunchServo.setPosition(DRONE_STOW_POS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class RobotConfig {
|
|||
public static final String GANTRY_X_NAME = "gantry_x";
|
||||
public static final String GANTRY_ARM_NAME = "gantryArm";
|
||||
public static final String GANTRY_SCREW_NAME = "screw";
|
||||
public static final String DRONE_ROTATION_UP_NAME = "droneUp";
|
||||
public static final String DRONE_ROTATION_UP_NAME = "droneLaunch";
|
||||
public static final String ROBOT_LIFT_ROTATION_NAME = "liftRotation";
|
||||
public static final String ROBOT_LIFT_LIFT_NAME = "liftLift";
|
||||
public static final String WEBCAM_NAME = "webcam";
|
||||
|
@ -53,6 +53,8 @@ public class RobotConfig {
|
|||
|
||||
// Robot Drone Launch
|
||||
public static double DRONE_ROTATION_UP = 0.2;
|
||||
public static double DRONE_LAUNCH_POS = 0.3;
|
||||
public static double DRONE_STOW_POS = 0.2;
|
||||
|
||||
// Robot Lift
|
||||
public static double LIFT_ROTATION_UP = 0.4;
|
||||
|
|
Loading…
Reference in New Issue