summaryrefslogtreecommitdiffstats
path: root/plugins/ufo/uca-ufo-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-31 12:02:11 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-31 12:02:11 +0200
commit1217923dbc0b907410642f611fdb5b13236cf850 (patch)
tree351ed1f7305b77a479e87c6f214416a81937aaea /plugins/ufo/uca-ufo-camera.c
parent67f433437efdfd7fa7a087603f38663574ea9146 (diff)
downloadlibuca-1217923dbc0b907410642f611fdb5b13236cf850.tar.gz
libuca-1217923dbc0b907410642f611fdb5b13236cf850.tar.bz2
libuca-1217923dbc0b907410642f611fdb5b13236cf850.tar.xz
libuca-1217923dbc0b907410642f611fdb5b13236cf850.zip
Switch to trigger source/type semantics
This change makes the naming more consistent but will break client and plugin code. The main idea is to specify a trigger source (AUTO being a virtual source) which denotes how causes a trigger and a trigger type which denotes when triggering happens (edge or level).
Diffstat (limited to 'plugins/ufo/uca-ufo-camera.c')
-rw-r--r--plugins/ufo/uca-ufo-camera.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ufo/uca-ufo-camera.c b/plugins/ufo/uca-ufo-camera.c
index 99a8c2f..1c0fd35 100644
--- a/plugins/ufo/uca-ufo-camera.c
+++ b/plugins/ufo/uca-ufo-camera.c
@@ -284,7 +284,7 @@ set_control_bit (UcaUfoCameraPrivate *priv, guint bit, gboolean set)
else
flags = flags & ~mask;
- err = pcilib_write_register(priv->handle, NULL, name, flags);
+ err = pcilib_write_register (priv->handle, NULL, name, flags);
PCILIB_WARN_ON_ERROR (err);
}
@@ -314,7 +314,7 @@ static void
uca_ufo_camera_start_recording(UcaCamera *camera, GError **error)
{
UcaUfoCameraPrivate *priv;
- UcaCameraTrigger trigger;
+ UcaCameraTriggerSource trigger_source;
gdouble exposure_time;
gboolean transfer_async;
@@ -325,11 +325,11 @@ uca_ufo_camera_start_recording(UcaCamera *camera, GError **error)
g_object_get (G_OBJECT(camera),
"transfer-asynchronously", &transfer_async,
"exposure-time", &exposure_time,
- "trigger-mode", &trigger,
+ "trigger-source", &trigger_source,
NULL);
- set_external_trigger_bit (priv, trigger == UCA_CAMERA_TRIGGER_EXTERNAL);
- set_streaming_bit (priv, trigger == UCA_CAMERA_TRIGGER_AUTO);
+ set_external_trigger_bit (priv, trigger == UCA_CAMERA_TRIGGER_SOURCE_EXTERNAL);
+ set_streaming_bit (priv, trigger_mode == UCA_CAMERA_TRIGGER_SOURCE_AUTO);
priv->timeout = ((pcilib_timeout_t) (exposure_time * 1000 + 50.0) * 1000);
@@ -341,13 +341,13 @@ static void
uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
{
UcaUfoCameraPrivate *priv;
- UcaCameraTrigger trigger;
+ UcaCameraTriggerSource trigger_source;
g_return_if_fail(UCA_IS_UFO_CAMERA(camera));
priv = UCA_UFO_CAMERA_GET_PRIVATE(camera);
set_external_trigger_bit (priv, FALSE);
- g_object_get (G_OBJECT (camera), "trigger-mode", &trigger, NULL);
+ g_object_get (G_OBJECT (camera), "trigger-source", &trigger_source, NULL);
if (priv->async_thread) {
int err = pcilib_stop(priv->handle, PCILIB_EVENT_FLAG_STOP_ONLY);
@@ -356,7 +356,7 @@ uca_ufo_camera_stop_recording(UcaCamera *camera, GError **error)
priv->async_thread = NULL;
}
- set_streaming_bit (priv, trigger != UCA_CAMERA_TRIGGER_AUTO);
+ set_streaming_bit (priv, trigger_mode != UCA_CAMERA_TRIGGER_SOURCE_AUTO);
}
static void