Skip to content

Commit

Permalink
Fix #353: Prevent changing parameters while recording
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoDritschler committed Jan 30, 2015
1 parent 517cefa commit f4329f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions concert/devices/cameras/uca.py
Expand Up @@ -15,6 +15,11 @@

def _new_setter_wrapper(name, unit=None):
def _wrapper(instance, value):
if instance:
if instance.state == 'recording':
raise base.CameraError(
'Changing parameters is not allowed while recording')

if unit:
value = value.to(unit)

Expand Down

2 comments on commit f4329f7

@matze
Copy link
Contributor

@matze matze commented on f4329f7 Jan 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there ever be the possibility that instance is None?

@tfarago
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea but the proper solution which doesn't limit camera features is not this simple (I hope I had commented before it was merged...). The problem is that e.g. PCO cameras allow you to change the exposure time while recording (which has proven to be very useful), this commit makes it impossible. On the other hand the proper solution would be pretty tedious - every camera has to "know" what can and cannot be changed during recording...

Please sign in to comment.