Skip to content

Commit

Permalink
Update axis_ptz_controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Mar 26, 2024
1 parent eedc34d commit 24d0eec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ def _compute_object_pointing(self, time_since_last_update=0) -> None:

# Assign lead time, computing and adding age of object
# message, if enabled
tracking_interval = time_since_last_update #self.tracking_interval # [s]
tracking_interval = self.tracking_interval # [s] time_since_last_update
if self.include_age:
object_msg_age = datetime.utcnow().timestamp() - self.timestamp_o # [s]
object_msg_age = time() - self.timestamp_o #datetime.utcnow().timestamp() - self.timestamp_o # [s]
logging.debug(f"Object msg age: {object_msg_age} [s]")
tracking_interval += object_msg_age
logging.info(f"Using lead time: {tracking_interval} [s]")
Expand Down Expand Up @@ -948,6 +948,7 @@ def _stop_timer_callback(self) -> None:

logging.info(f"Stopping image capture of object, updates timed out")
self.do_capture = False
self.status = Status.SLEEPING
logging.info("Stopping continuous pan and tilt - updates timed out")
try:
self.camera_control.stop_move()
Expand Down

0 comments on commit 24d0eec

Please sign in to comment.