Hanging code!

This commit is contained in:
robotics1
2024-12-12 18:19:35 -08:00
parent f80026465b
commit 2efe4229e9
4 changed files with 21 additions and 7 deletions

View File

@ -12,7 +12,7 @@ import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.BezierCurve;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathChain;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Point;
@Autonomous(name = "Auto Test", group = "Dev")
@Autonomous(name = "Auto Test1", group = "Dev")
public class BlueBasketAutoWithDrop1 extends OpMode {
private Telemetry telemetryA;

View File

@ -12,7 +12,7 @@ import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.BezierCurve;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.PathChain;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Point;
@Autonomous(name = "Auto Test", group = "Dev")
@Autonomous(name = "Auto Test2", group = "Dev")
public class BlueBasketAutoWithDrop2 extends OpMode {
private Telemetry telemetryA;

View File

@ -102,7 +102,7 @@ public class CometBotTeleopCompetition {
this.decreaseMaxPower();
this.increaseMaxPower();
this.raiseSkyHook();
this.lowerSkyHook();
//this.lowerSkyHook();
Actions.runBlocking(this.lift.toFloorPosition());
@ -253,17 +253,31 @@ public class CometBotTeleopCompetition {
}
public void lowerSkyHook() {
if (this.currentGP2.dpad_down && !this.previousGP2.dpad_down) {
if (this.currentGP2.dpad_down) {
hook.lowerHook(1.00);
}
else{
hook.lowerHook(0.00);
}
}
public void raiseSkyHook() {
if (this.currentGP2.dpad_up && !this.previousGP2.dpad_up) {
if (this.currentGP2.dpad_down) {
hook.lowerHook(1.00);
}
else if (this.currentGP2.dpad_up) {
hook.raiseHook(1.00);
}
else{
hook.raiseHook(0.00);
hook.lowerHook(0.00);
}
}
/*
Type: PS4
Controller: 2

View File

@ -28,12 +28,12 @@ public class SkyHookSubsystem {
public void raiseHook(double power){
this.hook.setPower(power);
this.hook.setDirection(DcMotorSimple.Direction.FORWARD);
this.setState(SkyHookState.UP);
//this.setState(SkyHookState.UP);
}
public void lowerHook(double power){
this.hook.setPower(power);
this.hook.setDirection(DcMotorSimple.Direction.REVERSE);
this.setState(SkyHookState.DOWN);
//this.setState(SkyHookState.DOWN);
}
public void init() {