From 08f91749121af362aa89599943439837b82cb125 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 4 Aug 2015 09:59:40 +0200 Subject: Enforce 12 bits for firmware version 6 --- uca-ufo-camera.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3