diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-10-08 19:05:57 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-10-08 19:05:57 +0200 |
commit | 358a84bb97226f60fb888d02e7e7dd1236708d2d (patch) | |
tree | 5cd967aa4f1f3954d95f8b6512569301a66bd7e0 | |
parent | fda61833ea8a8e6f1b10b66e0bb27614ef0eb750 (diff) | |
download | uca-ufo-358a84bb97226f60fb888d02e7e7dd1236708d2d.tar.gz uca-ufo-358a84bb97226f60fb888d02e7e7dd1236708d2d.tar.bz2 uca-ufo-358a84bb97226f60fb888d02e7e7dd1236708d2d.tar.xz uca-ufo-358a84bb97226f60fb888d02e7e7dd1236708d2d.zip |
Retry reading control registers as HZG camera often returns 0xffffffff in ROI mode
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | uca-ufo-camera.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba10a9b..2091f3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,11 +30,11 @@ add_custom_target(dist DEPENDS dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} package_ if (NOT DEFINED CMOSIS_SENSOR_WIDTH) - set(CMOSIS_SENSOR_WIDTH "2048") + set(CMOSIS_SENSOR_WIDTH "5120") endif () if (NOT DEFINED CMOSIS_SENSOR_HEIGHT) - set(CMOSIS_SENSOR_HEIGHT "1088") + set(CMOSIS_SENSOR_HEIGHT "3840") endif () set(CMOSIS_SENSOR_WIDTH ${CMOSIS_SENSOR_WIDTH} CACHE STRING "Width of the sensor") diff --git a/uca-ufo-camera.c b/uca-ufo-camera.c index 94d1d3c..61bf8a6 100644 --- a/uca-ufo-camera.c +++ b/uca-ufo-camera.c @@ -288,7 +288,12 @@ set_control_bit (UcaUfoCameraPrivate *priv, guint bit, gboolean set) pcilib_register_value_t flags; pcilib_register_value_t mask; - flags = read_register_value (priv->handle, name); + do { + flags = read_register_value (priv->handle, name); + usleep(10000); +// printf("%lx\n", flags); + } while ((flags&0xffffffff) == 0xffffffff); + mask = 1 << bit; if (set) |