Skip to content

Commit

Permalink
fix pause when no face detect
Browse files Browse the repository at this point in the history
  • Loading branch information
doudulac committed Nov 17, 2020
1 parent 78be683 commit a522596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion headmouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _update_posture(self):
self._cur_angle[1]))

def facing_camera(self):
if abs(self.x_angle) > 5.0 or self.y_angle < -5.0 or self.y_angle > 0:
if self._shapes is None or abs(self.x_angle) > 5.0 or self.y_angle < -5.0 or self.y_angle > 0:
return False
else:
return True
Expand Down

0 comments on commit a522596

Please sign in to comment.