mirror of
https://github.com/TimeCrafters/UltimateGoal.git
synced 2025-12-16 14:02:34 +00:00
(:
This commit is contained in:
@@ -7,22 +7,26 @@ public class SpencerDriveFoward extends CyberarmState {
|
|||||||
|
|
||||||
|
|
||||||
private Spencer_Dmitry spencer_dmitry;
|
private Spencer_Dmitry spencer_dmitry;
|
||||||
|
public int ourposition;
|
||||||
|
|
||||||
public SpencerDriveFoward(Spencer_Dmitry spencer_dmitry) {
|
public SpencerDriveFoward(Spencer_Dmitry spencer_dmitry) {
|
||||||
this.spencer_dmitry = spencer_dmitry;
|
this.spencer_dmitry = spencer_dmitry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exec() {
|
public void init() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start() {
|
public void start() {
|
||||||
super.start();
|
spencer_dmitry.driveleft.setPower(.5);
|
||||||
spencer_dmitry.driveright.setPower(0.5);
|
}
|
||||||
spencer_dmitry.driveleft.setPower(0.5);
|
|
||||||
|
@Override
|
||||||
|
public void exec() {
|
||||||
|
if (spencer_dmitry.driveleft.getCurrentPosition() >= ourposition){
|
||||||
|
spencer_dmitry.driveleft.setPower(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class Spencer_Dmitry {
|
|||||||
public void hardwareInt() {
|
public void hardwareInt() {
|
||||||
driveleft = hardwareMap.dcMotor.get("frontLeft");
|
driveleft = hardwareMap.dcMotor.get("frontLeft");
|
||||||
driveright = hardwareMap.dcMotor.get("frontRight");
|
driveright = hardwareMap.dcMotor.get("frontRight");
|
||||||
armmotor = hardwareMap.dcMotor.get("armMotor");
|
armmotor = hardwareMap.dcMotor.get("arm motor");
|
||||||
|
|
||||||
driveleft.setDirection(DcMotorSimple.Direction.REVERSE);
|
driveleft.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
driveright.setDirection(DcMotorSimple.Direction.FORWARD);
|
driveright.setDirection(DcMotorSimple.Direction.FORWARD);
|
||||||
|
|||||||
Reference in New Issue
Block a user