summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-31 08:16:08 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-31 08:16:08 +0200
commit67f433437efdfd7fa7a087603f38663574ea9146 (patch)
treeed5159497624d069a22729590bad27293d8b56d0 /plugins
parent2046dfd60d355cfff36cf94d81771e55d9a0d586 (diff)
downloadlibuca-67f433437efdfd7fa7a087603f38663574ea9146.tar.gz
libuca-67f433437efdfd7fa7a087603f38663574ea9146.tar.bz2
libuca-67f433437efdfd7fa7a087603f38663574ea9146.tar.xz
libuca-67f433437efdfd7fa7a087603f38663574ea9146.zip
ufo: enable/disable external triggering
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ufo/uca-ufo-camera.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c
index c3d6397..99a8c2f 100644
--- a/plugins/ufo/uca-ufo-camera.c
+++ b/plugins/ufo/uca-ufo-camera.c
@@ -289,11 +289,17 @@ set_control_bit (UcaUfoCameraPrivate *priv, guint bit, gboolean set)
}
static void
-set_streaming (UcaUfoCameraPrivate *priv, gboolean enable)
+set_streaming_bit (UcaUfoCameraPrivate *priv, gboolean enable)
{
set_control_bit (priv, 11, enable);
}
+static void
+set_external_trigger_bit (UcaUfoCameraPrivate *priv, gboolean enable)
+{
+ set_control_bit (priv, 14, enable);
+}
+
static gpointer
stream_async (UcaCamera *camera)
{
@@ -322,7 +328,9 @@ uca_ufo_camera_start_recording(UcaCamera *camera, GError **error)
"trigger-mode", &trigger,
NULL);
- set_streaming (priv, trigger == UCA_CAMERA_TRIGGER_AUTO);
+ set_external_trigger_bit (priv, trigger == UCA_CAMERA_TRIGGER_EXTERNAL);
+ set_streaming_bit (priv, trigger == UCA_CAMERA_TRIGGER_AUTO);
+
priv->timeout = ((pcilib_timeout_t) (exposure_time * 1000 + 50.0) * 1000);
if (transfer_async)
@@ -338,6 +346,7 @@ uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
priv = UCA_UFO_CAMERA_GET_PRIVATE(camera);
+ set_external_trigger_bit (priv, FALSE);
g_object_get (G_OBJECT (camera), "trigger-mode", &trigger, NULL);
if (priv->async_thread) {
@@ -347,7 +356,7 @@ uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
priv->async_thread = NULL;
}
- set_streaming (priv, trigger != UCA_CAMERA_TRIGGER_AUTO);
+ set_streaming_bit (priv, trigger != UCA_CAMERA_TRIGGER_AUTO);
}
static void