diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-07-12 09:30:43 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-07-12 09:30:43 +0200 |
commit | 887fe652b77f76e4b404102df180480d4fc97f2b (patch) | |
tree | ff94017ba686c94e35a59a2e5a64222d91a877f4 /src/cameras/uca-ufo-camera.c | |
parent | 29c2b827b09ba8138059a1c1e5db967ab2029ced (diff) | |
download | libuca-887fe652b77f76e4b404102df180480d4fc97f2b.tar.gz libuca-887fe652b77f76e4b404102df180480d4fc97f2b.tar.bz2 libuca-887fe652b77f76e4b404102df180480d4fc97f2b.tar.xz libuca-887fe652b77f76e4b404102df180480d4fc97f2b.zip |
Fix display of exposure time
Diffstat (limited to 'src/cameras/uca-ufo-camera.c')
-rw-r--r-- | src/cameras/uca-ufo-camera.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cameras/uca-ufo-camera.c b/src/cameras/uca-ufo-camera.c index 347f3c1..269da9d 100644 --- a/src/cameras/uca-ufo-camera.c +++ b/src/cameras/uca-ufo-camera.c @@ -37,6 +37,7 @@ G_DEFINE_TYPE(UcaUfoCamera, uca_ufo_camera, UCA_TYPE_CAMERA) static const guint SENSOR_WIDTH = 2048; static const guint SENSOR_HEIGHT = 1088; +static const gdouble EXPOSURE_TIME_SCALE = 2.69e6; /** * UcaUfoCameraError: @@ -263,7 +264,7 @@ static void uca_ufo_camera_set_property(GObject *object, guint property_id, cons 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_register_value_t reg_value = (pcilib_register_value_t) EXPOSURE_TIME_SCALE * g_value_get_double(value); pcilib_write_register(priv->handle, NULL, "exp_time", reg_value); } break; @@ -318,10 +319,9 @@ static void uca_ufo_camera_get_property(GObject *object, guint property_id, GVal break; case PROP_EXPOSURE_TIME: { - const gdouble factor = 2.67e-6; - pcilib_register_value_t time_steps; - pcilib_read_register(priv->handle, NULL, "exp_time", &time_steps); - g_value_set_double(value, factor * time_steps); + pcilib_register_value_t reg_value; + pcilib_read_register(priv->handle, NULL, "exp_time", ®_value); + g_value_set_double(value, reg_value / EXPOSURE_TIME_SCALE); } break; case PROP_HAS_STREAMING: |