diff options
| author | morefigs <morefigs@gmail.com> | 2019-02-21 10:48:50 +1100 |
|---|---|---|
| committer | morefigs <morefigs@gmail.com> | 2019-02-21 10:48:50 +1100 |
| commit | edbbf80d3e8b981cc71cd61f85fd14d0effd3e88 (patch) | |
| tree | 44ec86d1287723ac7d4ddd2b31a8a2e88ab6bb34 | |
| parent | cd9935d70d18141257a7731a3a8f6f571f7a7aaf (diff) | |
| download | pymba-edbbf80d3e8b981cc71cd61f85fd14d0effd3e88.tar.gz pymba-edbbf80d3e8b981cc71cd61f85fd14d0effd3e88.zip | |
auto adjust packet size upon opening camera
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | pymba/camera.py | 10 |
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. |
