Skip to content

Conversation

@misterhay
Copy link
Owner

This commit includes several improvements and fixes to the visca_over_ip Camera and CachingCamera classes:

  • Improved Camera.__init__ error handling: Re-raises ViscaException if clearing the camera's interface socket fails during initialization.
  • Refined Camera.reset_sequence_number: Ensures client-side sequence number is reset only if a confirmation response is received from the camera.
  • Fixed Camera.get_focus_mode(): Corrected error handling for unknown or malformed responses, removing an unreachable code path.
  • Strengthened CachingCamera.__init__ resilience: The constructor now handles potential ViscaException when fetching the initial focus mode, allowing the object to be created by defaulting focus_mode to None and printing a warning.
  • Added missing docstrings: Provided documentation for several public methods in camera.py related to adjusting gain, shutter, iris, brightness, exposure, and aperture.

Potential Issue Noted:
During the addition of docstrings, I observed that the methods increase_white_balance_temperature, decrease_white_balance_temperature, and reset_white_balance_temperature in camera.py use VISCA commands identical to those for red gain adjustment. This is likely a bug and requires further investigation to ensure correct camera operation for white balance temperature.

This commit includes several improvements and fixes to the visca_over_ip Camera and CachingCamera classes:

- Improved `Camera.__init__` error handling: Re-raises `ViscaException` if clearing the camera's interface socket fails during initialization.
- Refined `Camera.reset_sequence_number`: Ensures client-side sequence number is reset only if a confirmation response is received from the camera.
- Fixed `Camera.get_focus_mode()`: Corrected error handling for unknown or malformed responses, removing an unreachable code path.
- Strengthened `CachingCamera.__init__` resilience: The constructor now handles potential `ViscaException` when fetching the initial focus mode, allowing the object to be created by defaulting `focus_mode` to `None` and printing a warning.
- Added missing docstrings: Provided documentation for several public methods in `camera.py` related to adjusting gain, shutter, iris, brightness, exposure, and aperture.

Potential Issue Noted:
During the addition of docstrings, I observed that the methods `increase_white_balance_temperature`, `decrease_white_balance_temperature`, and `reset_white_balance_temperature` in `camera.py` use VISCA commands identical to those for red gain adjustment. This is likely a bug and requires further investigation to ensure correct camera operation for white balance temperature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants