Skip to content

Commit

Permalink
autofocus every frame instead of on recenter
Browse files Browse the repository at this point in the history
  • Loading branch information
EricPedley committed Jun 11, 2024
1 parent bae05c8 commit 2fb02cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/imaging_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ def point_camera_down(self):
self.log(f"Waiting to point down. Current angle: {self.camera.getAttitude()[1] } . " )
time.sleep(0.1)
self.log("Camera pointed down")
self.camera.request_autofocus()

@log_exceptions
def get_image_down(self, request, response: list[TargetDetection]) -> list[TargetDetection]:
Expand All @@ -281,6 +280,7 @@ def get_image_down(self, request, response: list[TargetDetection]) -> list[Targe

if abs(self.camera.getAttitude()[1] - -90) > 5: # Allow 5 degrees of error (Arbitrary)
self.point_camera_down()
self.camera.request_autofocus()

#TODO: Figure out a way to detect when the gimbal is having an aneurism and figure out how to fix it or send msg to groundstation.

Expand Down

0 comments on commit 2fb02cd

Please sign in to comment.