diff options
author | Timo Dritschler <timo.dritschler@kit.edu> | 2015-03-02 15:57:23 +0100 |
---|---|---|
committer | Timo Dritschler <timo.dritschler@kit.edu> | 2015-03-09 11:12:26 +0100 |
commit | 453701eddba38052a466e91d614fd999b52bca4a (patch) | |
tree | 2b0c346ab845f1b47f8d18aad675411cedef4673 /plugins/pco/uca-pco-camera.c | |
parent | 43a5d42eeaccb08b7703e01e326e397ed3cd4ac2 (diff) | |
download | libuca-453701eddba38052a466e91d614fd999b52bca4a.tar.gz libuca-453701eddba38052a466e91d614fd999b52bca4a.tar.bz2 libuca-453701eddba38052a466e91d614fd999b52bca4a.tar.xz libuca-453701eddba38052a466e91d614fd999b52bca4a.zip |
Added check for 'writable during acquisition' to all set_property calls
Diffstat (limited to 'plugins/pco/uca-pco-camera.c')
-rw-r--r-- | plugins/pco/uca-pco-camera.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c index 52fded5..b10d815 100644 --- a/plugins/pco/uca-pco-camera.c +++ b/plugins/pco/uca-pco-camera.c @@ -687,9 +687,15 @@ uca_pco_camera_grab(UcaCamera *camera, gpointer data, GError **error) static void uca_pco_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - UcaPcoCameraPrivate *priv = UCA_PCO_CAMERA_GET_PRIVATE(object); + g_return_if_fail (UCA_IS_PCO_CAMERA (object)); + UcaPcoCameraPrivate *priv = UCA_PCO_CAMERA_GET_PRIVATE (object); guint err = PCO_NOERROR; + if (uca_camera_is_recording (UCA_CAMERA (object)) && !uca_camera_is_writable_during_acquisition (UCA_CAMERA (object), pspec->name)) { + g_warning ("Property '%s' cant be changed during acquisition", pspec->name); + return; + } + switch (property_id) { case PROP_SENSOR_EXTENDED: { @@ -1781,6 +1787,9 @@ uca_pco_camera_init (UcaPcoCamera *self) uca_camera_register_unit (camera, "cooling-point-default", UCA_UNIT_DEGREE_CELSIUS); uca_camera_register_unit (camera, "sensor-adcs", UCA_UNIT_COUNT); uca_camera_register_unit (camera, "sensor-max-adcs", UCA_UNIT_COUNT); + + uca_camera_set_writable (camera, "exposure-time"); + uca_camera_set_writable (camera, "frames-per-second"); } G_MODULE_EXPORT GType |