From 80ac5c5d183d6efc3e554a638770637086f0fb78 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 5 Nov 2013 08:19:46 +0100 Subject: Fix #15: set correct pixel sizes for pco.* --- plugins/pco/uca-pco-camera.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c index 7629972..bae7b53 100644 --- a/plugins/pco/uca-pco-camera.c +++ b/plugins/pco/uca-pco-camera.c @@ -142,6 +142,8 @@ static gint base_overrideables[] = { PROP_NAME, PROP_SENSOR_WIDTH, PROP_SENSOR_HEIGHT, + PROP_SENSOR_PIXEL_WIDTH, + PROP_SENSOR_PIXEL_HEIGHT, PROP_SENSOR_BITDEPTH, PROP_SENSOR_HORIZONTAL_BINNING, PROP_SENSOR_HORIZONTAL_BINNINGS, @@ -815,7 +817,7 @@ uca_pco_camera_set_property(GObject *object, guint property_id, const GValue *va } static void -uca_pco_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) +uca_pco_camera_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { UcaPcoCameraPrivate *priv = UCA_PCO_CAMERA_GET_PRIVATE(object); guint err = PCO_NOERROR; @@ -837,6 +839,34 @@ uca_pco_camera_get_property(GObject *object, guint property_id, GValue *value, G g_value_set_uint(value, priv->height); break; + case PROP_SENSOR_PIXEL_WIDTH: + switch (priv->description->type) { + case CAMERATYPE_PCO_EDGE: + g_value_set_double (value, 0.0000065); + break; + case CAMERATYPE_PCO_DIMAX_STD: + g_value_set_double (value, 0.0000110); + break; + case CAMERATYPE_PCO4000: + g_value_set_double (value, 0.0000090); + break; + } + break; + + case PROP_SENSOR_PIXEL_HEIGHT: + switch (priv->description->type) { + case CAMERATYPE_PCO_EDGE: + g_value_set_double (value, 0.0000065); + break; + case CAMERATYPE_PCO_DIMAX_STD: + g_value_set_double (value, 0.0000110); + break; + case CAMERATYPE_PCO4000: + g_value_set_double (value, 0.0000090); + break; + } + break; + case PROP_SENSOR_WIDTH_EXTENDED: g_value_set_uint(value, priv->width_ex < priv->width ? priv->width : priv->width_ex); break; -- cgit v1.2.3