diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-08-26 11:11:15 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-08-26 11:11:15 +0200 |
commit | a378a8bfd0cc4a5d79f680caf646571b19126f86 (patch) | |
tree | 49124dfcba5b9168cea57df1a4fc850322fc0743 | |
parent | b655f1b1bac64bf548df9d6d9a8f0b1322171804 (diff) | |
download | uca-ufo-a378a8bfd0cc4a5d79f680caf646571b19126f86.tar.gz uca-ufo-a378a8bfd0cc4a5d79f680caf646571b19126f86.tar.bz2 uca-ufo-a378a8bfd0cc4a5d79f680caf646571b19126f86.tar.xz uca-ufo-a378a8bfd0cc4a5d79f680caf646571b19126f86.zip |
Remove adc_resolution fix
This is corrected with current firmware versions.
-rw-r--r-- | uca-ufo-camera.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/uca-ufo-camera.c b/uca-ufo-camera.c index bbcb150..63f7313 100644 --- a/uca-ufo-camera.c +++ b/uca-ufo-camera.c @@ -219,8 +219,6 @@ update_properties (UcaUfoCameraPrivate *priv) static gboolean setup_pcilib (UcaUfoCameraPrivate *priv) { - guint32 firmware_version; - priv->handle = pcilib_open("/dev/fpga0", "ipecamera"); if (priv->handle == NULL) { @@ -236,19 +234,15 @@ setup_pcilib (UcaUfoCameraPrivate *priv) N_PROPERTIES = update_properties (priv); priv->frequency = read_register_value (priv->handle, "control") >> 31; + priv->n_bits = read_register_value (priv->handle, "adc_resolution") + 10; - /* FIXME: this is a fix to prevent wrong assumption about the bitdepth with - * the CMOSIS20000 chip and the height of the sensor in pixels. This should - * be removed as soon as possible. + /* FIXME: this is a fix to prevent wrong assumption about the height of the + * sensor in pixels. This should be removed as soon as possible. */ - if (read_register_value (priv->handle, "firmware_version") == 6) { - priv->n_bits = 12; + if (read_register_value (priv->handle, "firmware_version") > 5) priv->height = read_register_value (priv->handle, "cmosis_number_lines_single"); - } - else { - priv->n_bits = read_register_value (priv->handle, "adc_resolution") + 10; + else priv->height = read_register_value (priv->handle, "cmosis_number_lines"); - } return TRUE; } |