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