diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-08-04 09:59:40 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-08-04 09:59:40 +0200 |
commit | 08f91749121af362aa89599943439837b82cb125 (patch) | |
tree | 0c666a590249e3ebb489d6e9b89a371cf451390a /uca-ufo-camera.c | |
parent | f898f665950150d187eebd295c5bd77b49bc627b (diff) | |
download | uca-ufo-08f91749121af362aa89599943439837b82cb125.tar.gz uca-ufo-08f91749121af362aa89599943439837b82cb125.tar.bz2 uca-ufo-08f91749121af362aa89599943439837b82cb125.tar.xz uca-ufo-08f91749121af362aa89599943439837b82cb125.zip |
Enforce 12 bits for firmware version 6
Diffstat (limited to 'uca-ufo-camera.c')
-rw-r--r-- | uca-ufo-camera.c | 9 |
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; } |