diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-04-17 16:26:32 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-04-17 16:26:32 +0200 |
commit | 435855dffba54084c9df5c3521cb0b41fd5086df (patch) | |
tree | 4e900c81e835bbf628271978842d1f9c75f1d45d /src | |
parent | 753a20e6fc17d9266a94663f5a89a11eaf982284 (diff) | |
download | uca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.gz uca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.bz2 uca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.xz uca-435855dffba54084c9df5c3521cb0b41fd5086df.zip |
Make exposure time writeable
Diffstat (limited to 'src')
-rw-r--r-- | src/cameras/uca-ufo-camera.c | 9 | ||||
-rw-r--r-- | src/uca-camera.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/cameras/uca-ufo-camera.c b/src/cameras/uca-ufo-camera.c index 97e4271..e642605 100644 --- a/src/cameras/uca-ufo-camera.c +++ b/src/cameras/uca-ufo-camera.c @@ -181,7 +181,16 @@ static void uca_ufo_camera_grab(UcaCamera *camera, gpointer *data, GError **erro static void uca_ufo_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { + UcaUfoCameraPrivate *priv = UCA_UFO_CAMERA_GET_PRIVATE(object); + switch (property_id) { + case PROP_EXPOSURE_TIME: + { + pcilib_register_value_t reg_value = (pcilib_register_value_t) 2.67e6 * g_value_get_double(value); + pcilib_write_register(priv->handle, NULL, "exp_time", reg_value); + } + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); return; diff --git a/src/uca-camera.c b/src/uca-camera.c index 1e35dc7..98e5f49 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -234,7 +234,7 @@ static void uca_camera_class_init(UcaCameraClass *klass) "Exposure time in seconds", "Exposure time in seconds", 0.0, G_MAXDOUBLE, 1.0, - G_PARAM_READABLE); + G_PARAM_READWRITE); camera_properties[PROP_SENSOR_MAX_FRAME_RATE] = g_param_spec_float("max-frame-rate", |