Skip to content

Commit

Permalink
Clear the blue ring when stopping the camera
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Sep 27, 2024
1 parent 51bfc7f commit ea53799
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __init__(self):
10,
)

self._is_paused = False
self.is_paused_ = False

self.start_camera_srv = self.create_service(
Trigger,
Expand Down Expand Up @@ -175,7 +175,7 @@ def __init__(self):
# self.button_1_function()

def pose_detect(self):
if self._is_paused:
if self.is_paused_:
return

if not (POSE_DETECT_ENABLE):
Expand Down Expand Up @@ -326,8 +326,9 @@ def autonomous_lights(self):
self.lightring_publisher.publish(lightring_msg)

def handle_start_camera(self, req, resp):
if self._is_paused:
self._is_paused = False
if self.is_paused_:
self.is_paused_ = False
self.lights_blue_ = False
self.pose = MovenetDepthai(input_src='rgb',
model='thunder',
score_thresh=0.3,
Expand All @@ -340,8 +341,9 @@ def handle_start_camera(self, req, resp):
return resp

def handle_stop_camera(self, req, resp):
if not self._is_paused:
self._is_paused = True
if not self.is_paused_:
self.is_paused_ = True
self.lights_blue_ = False
self.pose.device.close()
self.pose = None
resp.success = True
Expand Down

0 comments on commit ea53799

Please sign in to comment.