summaryrefslogtreecommitdiffstats
path: root/src/cameras
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-17 16:26:32 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-04-17 16:26:32 +0200
commit435855dffba54084c9df5c3521cb0b41fd5086df (patch)
tree4e900c81e835bbf628271978842d1f9c75f1d45d /src/cameras
parent753a20e6fc17d9266a94663f5a89a11eaf982284 (diff)
downloadlibuca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.gz
libuca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.bz2
libuca-435855dffba54084c9df5c3521cb0b41fd5086df.tar.xz
libuca-435855dffba54084c9df5c3521cb0b41fd5086df.zip
Make exposure time writeable
Diffstat (limited to 'src/cameras')
-rw-r--r--src/cameras/uca-ufo-camera.c9
1 files changed, 9 insertions, 0 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;