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 25, 2024
1 parent 75a42f1 commit 9db0735
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
loop_interval: float = 0.1,
capture_interval: int = 2,
capture_dir: str = ".",
tracking_interval: float = 0.5,
tracking_interval: float = 1.0,
tripod_yaw: float = 0.0,
tripod_pitch: float = 0.0,
tripod_roll: float = 0.0,
Expand Down Expand Up @@ -1384,7 +1384,7 @@ def main(self) -> None:
capture_job = schedule.every(self.capture_interval).seconds.do(
self._capture_image
)
tracking_interval = self.tracking_interval #0.25

update_tracking_time = time()

# Enter the main loop
Expand All @@ -1401,7 +1401,7 @@ def main(self) -> None:


# Track object
if ( self.use_camera and time() - update_tracking_time > tracking_interval ):
if ( self.use_camera and time() - update_tracking_time > self.tracking_interval ):
update_tracking_time = time()
self._track_object()

Expand Down Expand Up @@ -1485,7 +1485,7 @@ def make_controller() -> AxisPtzController:
loop_interval=float(os.environ.get("LOOP_INTERVAL", 0.1)),
capture_interval=int(os.environ.get("CAPTURE_INTERVAL", 2)),
capture_dir=os.environ.get("CAPTURE_DIR", "."),
tracking_interval=float(os.environ.get("TRACKING_INTERVAL", 0.5)),
tracking_interval=float(os.environ.get("TRACKING_INTERVAL", 1.0)),
tripod_yaw=float(os.environ.get("TRIPOD_YAW", 0.0)),
tripod_pitch=float(os.environ.get("TRIPOD_PITCH", 0.0)),
tripod_roll=float(os.environ.get("TRIPOD_ROLL", 0.0)),
Expand Down

0 comments on commit 9db0735

Please sign in to comment.