Skip to content

Commit 26f83ff

Browse files
authored
Merge pull request #246 from thedropbears/make_measurment_block_next_state
2 parents 221af5a + 1f047e9 commit 26f83ff

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

controllers/floor_intake.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def intaking(self, initial_call: bool):
4747
def measuring(self, initial_call):
4848
if initial_call:
4949
self.algae_measurement.measure()
50-
else:
50+
self.wrist.go_to_neutral()
51+
self.intake_component.retract()
52+
elif not self.algae_measurement.is_executing:
5153
self.done()
5254

5355
def done(self) -> None:
5456
super().done()
55-
self.wrist.go_to_neutral()
56-
self.intake_component.retract()

controllers/reef_intake.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ def safing(self, initial_call: bool):
9595
robot_pose.translation()
9696
)
9797

98-
if distance >= self.RETREAT_DISTANCE:
98+
if (
99+
distance >= self.RETREAT_DISTANCE
100+
and not self.algae_measurement.is_executing
101+
):
99102
self.done()
100103

101104
def done(self) -> None:

0 commit comments

Comments
 (0)