diff options
-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", |