diff options
author | Mihael Koep <koep@schneide.com> | 2012-10-09 14:20:11 +0200 |
---|---|---|
committer | Mihael Koep <koep@schneide.com> | 2012-10-09 14:20:11 +0200 |
commit | b73c7a9550a39566b881244d95cd0cb2a97e82b3 (patch) | |
tree | 18190d3eeaa187e8a840872bffac7067acb99516 /src | |
parent | 5783156882cde177cd6c2f7e06451e8e0444e666 (diff) | |
download | libuca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.gz libuca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.bz2 libuca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.tar.xz libuca-b73c7a9550a39566b881244d95cd0cb2a97e82b3.zip |
fix SCHNEIDE-382: use correct micros to seconds factor.
Diffstat (limited to 'src')
-rw-r--r-- | src/cameras/uca-dexela-camera.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); } |