summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihael Koep <koep@schneide.com>2012-10-09 14:20:11 +0200
committerMihael Koep <koep@schneide.com>2012-10-09 14:20:11 +0200
commitb73c7a9550a39566b881244d95cd0cb2a97e82b3 (patch)
tree18190d3eeaa187e8a840872bffac7067acb99516
parent5783156882cde177cd6c2f7e06451e8e0444e666 (diff)
downloaduca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.gz
uca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.bz2
uca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.xz
uca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.zip
fix SCHNEIDE-382: use correct micros to seconds factor.
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/cameras/uca-dexela-camera.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f7ef43..3c8c7cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project(uca C)
set(TARNAME "libuca")
set(UCA_VERSION_MAJOR "0")
set(UCA_VERSION_MINOR "6")
-set(UCA_VERSION_PATCH "0")
+set(UCA_VERSION_PATCH "1")
set(UCA_DESCRIPTION "Unified Camera Access")
set(UCA_VERSION_STRING "${UCA_VERSION_MAJOR}.${UCA_VERSION_MINOR}.${UCA_VERSION_PATCH}")
@@ -17,7 +17,7 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket")
set(CPACK_GENERATOR "DEB;RPM;")
-set(CPACK_PACKAGE_RELEASE 4)
+set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_DEBIAN_PACKAGE_NAME "libuca")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Vogelgesang <matthias.vogelgesang@kit.edu>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${UCA_DESCRIPTION})
diff --git a/src/cameras/uca-dexela-camera.c b/src/cameras/uca-dexela-camera.c
index 13e8b05..7ec96e6 100644
--- a/src/cameras/uca-dexela-camera.c
+++ b/src/cameras/uca-dexela-camera.c
@@ -64,7 +64,7 @@ static gint base_overrideables[] = {
static GParamSpec *dexela_properties[N_PROPERTIES] = { NULL, };
-static const gdouble MICROS_TO_SECONDS_FACTOR = 10e6d;
+static const gdouble MICROS_TO_SECONDS_FACTOR = 1e6d;
struct _UcaDexelaCameraPrivate {
GValueArray *binnings;
@@ -268,7 +268,7 @@ static void uca_dexela_camera_set_property(GObject *object, guint property_id, c
case PROP_EXPOSURE_TIME:
{
const gdouble exposureTimeInSeconds = g_value_get_double(value);
- dexela_set_exposure_time_micros(exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR);
+ dexela_set_exposure_time_micros((gint) (exposureTimeInSeconds * MICROS_TO_SECONDS_FACTOR));
break;
}
case PROP_SENSOR_HORIZONTAL_BINNING:
@@ -342,12 +342,10 @@ static void uca_dexela_camera_grab(UcaCamera *camera, gpointer *data, GError **e
g_debug("grab called");
g_return_if_fail(UCA_IS_DEXELA_CAMERA(camera));
UcaDexelaCameraPrivate *priv = UCA_DEXELA_CAMERA_GET_PRIVATE(camera);
- g_debug("Data-pointer: %p, %p", data, *data);
if (*data == NULL) {
g_debug("Allocating buffer");
*data = g_malloc0(priv->width * priv->height * priv->num_bytes);
}
- // TODO: fetch image from libdexela
// TODO: copy to the data buffer
memcpy((gchar *) *data, dexela_grab(), priv->width * priv->height * priv->num_bytes);
}