Skip to content

Commit

Permalink
fix for focus - make sure it is a float
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Jan 25, 2025
1 parent 4e777a5 commit e766bbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,11 @@ def _config_callback(
self.camera.focus = config["focus"]
if "focus_min" in config or "focus_max" in config or "hyperfocal_distance" in config:
if "focus_min" in config:
self.camera.focus_min = config["focus_min"]
self.camera.focus_min = float(config["focus_min"])
if "focus_max" in config:
self.camera.focus_max = config["focus_max"]
self.camera.focus_max = float(config["focus_max"])
if "hyperfocal_distance" in config:
self.camera.hyperfocal_distance = config["hyperfocal_distance"]
self.camera.hyperfocal_distance = float(config["hyperfocal_distance"])
self.camera.recalculate_focus()
if "auto_focus" in config:
self.camera.auto_focus = config["auto_focus"]
Expand Down

0 comments on commit e766bbd

Please sign in to comment.