Skip to content

Commit

Permalink
Merge pull request #32 from mchadwick-iqt/main
Browse files Browse the repository at this point in the history
Configure Capture Period
  • Loading branch information
meadej committed Nov 14, 2022
2 parents c9c3c6a + fa28761 commit ac40f8b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions axis-ptz/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
cameraDelay = None
cameraLead = 0
inhibitPhotos = False
capturePeriod = 1000 # milliseconds
active = False
Active = True

Expand Down Expand Up @@ -218,7 +219,6 @@ def calculateCameraPosition():
def moveCamera(ip, username, password):

movePeriod = 100 # milliseconds
capturePeriod = 1000 # milliseconds
moveTimeout = datetime.now()
captureTimeout = datetime.now()
camera = vapix_control.CameraControl(ip, username, password)
Expand Down Expand Up @@ -262,6 +262,7 @@ def update_config(config):
global camera_altitude
global cameraBearingCorrection
global inhibitPhotos
global capturePeriod

if "cameraZoom" in config:
cameraZoom = int(config["cameraZoom"])
Expand All @@ -287,7 +288,9 @@ def update_config(config):
logging.info("Setting Camera to inhibit photos")
else:
logging.info("Setting Camera to save photos")

if "capturePeriod" in config:
capturePeriod = float(config["capturePeriod"])
logging.info("Setting Camera Capture Period (sec) to: {}".format(capturePeriod))

#############################################
## MQTT Callback Function ##
Expand Down

0 comments on commit ac40f8b

Please sign in to comment.