diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-03-03 11:56:31 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-03-03 11:56:31 +0100 |
commit | 12415c23aa4ff65aae3297b5f52b9512360c2b6c (patch) | |
tree | 4410f98ee63bd6c93bcef9dbfadee7bf7353c184 | |
parent | 7b5cdaf0f6078156fe494aef6251b76341b51a7c (diff) | |
download | uca-12415c23aa4ff65aae3297b5f52b9512360c2b6c.tar.gz uca-12415c23aa4ff65aae3297b5f52b9512360c2b6c.tar.bz2 uca-12415c23aa4ff65aae3297b5f52b9512360c2b6c.tar.xz uca-12415c23aa4ff65aae3297b5f52b9512360c2b6c.zip |
pco: Add fast-scan property
-rw-r--r-- | plugins/pco/uca-pco-camera.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c index 8ccee1c..71b973c 100644 --- a/plugins/pco/uca-pco-camera.c +++ b/plugins/pco/uca-pco-camera.c @@ -129,6 +129,7 @@ enum { PROP_RECORD_MODE, PROP_STORAGE_MODE, PROP_ACQUIRE_MODE, + PROP_FAST_SCAN, PROP_COOLING_POINT, PROP_COOLING_POINT_MIN, PROP_COOLING_POINT_MAX, @@ -816,6 +817,9 @@ uca_pco_camera_set_property(GObject *object, guint property_id, const GValue *va if (pixel_rate != 0) { err = pco_set_pixelrate(priv->pco, pixel_rate); + + if (err != PCO_NOERROR) + err = pco_reset(priv->pco); } else g_warning("%i Hz is not possible. Please check the \"sensor-pixelrates\" property", desired_pixel_rate); @@ -881,6 +885,15 @@ uca_pco_camera_set_property(GObject *object, guint property_id, const GValue *va } break; + case PROP_FAST_SCAN: + { + guint32 mode; + + mode = g_value_get_boolean (value) ? PCO_SCANMODE_FAST : PCO_SCANMODE_SLOW; + pco_set_scan_mode (priv->pco, mode); + } + break; + case PROP_TRIGGER_MODE: { UcaCameraTrigger trigger_mode = (UcaCameraTrigger) g_value_get_enum(value); @@ -1187,6 +1200,14 @@ uca_pco_camera_get_property (GObject *object, guint property_id, GValue *value, } break; + case PROP_FAST_SCAN: + { + guint32 mode; + err = pco_get_scan_mode (priv->pco, &mode); + g_value_set_boolean (value, mode == PCO_SCANMODE_FAST); + } + break; + case PROP_TRIGGER_MODE: { guint16 mode; @@ -1496,6 +1517,12 @@ uca_pco_camera_class_init(UcaPcoCameraClass *klass) UCA_TYPE_PCO_CAMERA_ACQUIRE_MODE, UCA_PCO_CAMERA_ACQUIRE_MODE_AUTO, G_PARAM_READWRITE); + pco_properties[PROP_FAST_SCAN] = + g_param_spec_boolean("fast-scan", + "Use fast scan mode", + "Use fast scan mode with less dynamic range", + FALSE, G_PARAM_READWRITE); + pco_properties[PROP_NOISE_FILTER] = g_param_spec_boolean("noise-filter", "Noise filter", |