Skip to content

Commit d6e705f

Browse files
make measurment block
1 parent 221af5a commit d6e705f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

controllers/floor_intake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def intaking(self, initial_call: bool):
4747
def measuring(self, initial_call):
4848
if initial_call:
4949
self.algae_measurement.measure()
50-
else:
50+
elif not self.algae_measurement.is_executing:
5151
self.done()
5252

5353
def done(self) -> None:

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)