aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--pymba/camera.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5aa019..ad0f512 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Pymba change log
+## [0.3.1] - 2019/02/21
+### Added
+- Auto adjust packet size upon opening camera.
+
## [0.3] - 2019/02/11
### Added
- Convenience functions for arming and acquiring single images and image streams from a camera.
@@ -10,4 +14,3 @@
- Python 3 support only.
### Added
- Usage examples.
-
diff --git a/pymba/camera.py b/pymba/camera.py
index f4ae94e..4cda105 100644
--- a/pymba/camera.py
+++ b/pymba/camera.py
@@ -119,9 +119,11 @@ class Camera(VimbaObject):
"""
return _camera_info(self.camera_id)
- def open(self, camera_access_mode: Optional[int] = VimbaObject.VMB_ACCESS_MODE_FULL):
+ def open(self,
+ camera_access_mode: Optional[int] = VimbaObject.VMB_ACCESS_MODE_FULL,
+ adjust_packet_size: Optional[bool] = True):
"""
- Open the camera with requested access mode.
+ Open the camera with requested access mode. Adjusts packet size by default.
"""
error = vimba_c.vmb_camera_open(self.camera_id.encode(),
camera_access_mode,
@@ -129,6 +131,10 @@ class Camera(VimbaObject):
if error:
raise VimbaException(error)
+ # may experience issues with camera comms if not called
+ if adjust_packet_size:
+ self.run_feature_command('GVSPAdjustPacketSize')
+
def close(self):
"""
Close the camera.