Skip to content

Commit

Permalink
speed up auto parts
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinencounter committed Dec 22, 2024
1 parent 2393a62 commit 1572db2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public void ScoreHighBasket2() {
abandonLock(Locks.ArmAssembly);
abandonLock(vLiftProxy.CONTROL);
scheduler.add(groupOf(inner -> inner.add(run(() -> hardware.wrist.setPosition(0.94)))
.then(await(700))
.then(await(200))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_OPEN)))
.then(await(100))
.then(run(() -> hardware.wrist.setPosition(0.28)))
Expand Down Expand Up @@ -506,7 +506,7 @@ public void specimenWallPick() {
groupOf(it -> it.add(run(() -> hardware.claw.setPosition(Hardware.CLAW_OPEN)))
.then(await(200))
.then(run(() -> hardware.wrist.setPosition(Hardware.WRIST_UP)))
.then(await(500))
.then(await(200))
.then(run(() -> hardware.arm.setTargetPosition(50)))
.then(await(500))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_CLOSE)))
Expand Down Expand Up @@ -576,12 +576,12 @@ public void transferAndDrop() {
abandonLock(Locks.ArmAssembly);
transferInternal()
.then(groupOf(
it -> it.add(run(() -> hardware.arm.setTargetPosition(Hardware.deg2arm(35))))
.then(await(1000))
it -> it.add(run(() -> hardware.arm.setTargetPosition(Hardware.deg2arm(10))))
.then(await(100))
.then(run(() -> hardware.wrist.setPosition(0.75)))
.then(await(100))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_OPEN)))
.then(await(500))
.then(await(300))
.then(run(() -> {
hardware.wrist.setPosition(Hardware.WRIST_BACK);
hardware.arm.setTargetPosition(0);
Expand Down Expand Up @@ -632,7 +632,7 @@ private TaskGroup transferInternal() {
hardware.wrist.setPosition(0);
hardware.arm.setTargetPosition(-28);
}))
.then(await(500))
.then(await(300))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_CLOSE)))
.then(await(250))
.then(hClawProxy.aSetClaw(Hardware.FRONT_OPEN))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ private ITask transfer() {
}

private ITask drop() {
return groupOf(it -> it.add(run(() -> hardware.arm.setTargetPosition(Hardware.deg2arm(35))))
return groupOf(it -> it.add(run(() -> hardware.arm.setTargetPosition(Hardware.deg2arm(10))))
.then(run(() -> hardware.wrist.setPosition(0.75)))
.then(await(600))
.then(await(200))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_OPEN)))
.then(await(500))
.then(await(200))
.then(run(() -> {
hardware.wrist.setPosition(Hardware.WRIST_BACK);
hardware.arm.setTargetPosition(0);
Expand All @@ -239,7 +239,7 @@ private ITask scoreSpecimen() {
.then(run(() -> hardware.arm.setTargetPosition(Hardware.deg2arm(-99))))
.then(vLiftProxy.moveTo(710, 5, 1.0))
.then(run(() -> hardware.wrist.setPosition(1)))
.then(await(700))
.then(await(300))
.then(moveRel(new Pose(-4.0, 0, 0)))
.then(run(() -> hardware.claw.setPosition(Hardware.CLAW_OPEN)))
.then(await(200))
Expand Down

0 comments on commit 1572db2

Please sign in to comment.