summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uca-ufo-camera.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/uca-ufo-camera.c b/uca-ufo-camera.c
index 5aa6829..c55fbab 100644
--- a/uca-ufo-camera.c
+++ b/uca-ufo-camera.c
@@ -235,7 +235,14 @@ setup_pcilib (UcaUfoCameraPrivate *priv)
priv->height = read_register_value (priv->handle, "cmosis_number_lines_single");
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. This should be removed as soon as possible.
+ */
+ if (read_register_value (priv->handle, "firmware_version") == 6)
+ priv->n_bits = 12;
+ else
+ priv->n_bits = read_register_value (priv->handle, "adc_resolution") + 10;
return TRUE;
}