From 1954f916e989b70b1b2ef516faab3ffae084563d Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 24 Mar 2011 15:35:18 +0100 Subject: Return somewhat more reliable numbers for min/max delay and exposure --- src/cameras/pco.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/cameras') diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 29fb70e..b3ff872 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -165,31 +165,43 @@ static uint32_t uca_pco_get_property(struct uca_camera *cam, enum uca_property_i case UCA_PROP_DELAY: { uint32_t exposure; - return pco_get_delay_exposure(pco, (uint32_t *) data, &exposure); + pco_get_delay_exposure(pco, (uint32_t *) data, &exposure); } break; case UCA_PROP_DELAY_MIN: - uca_set_void(data, uint32_t, pco->description.dwMinDelayDESC); + { + uint32_t delay = pco->description.dwMinDelayDESC / 1000; + uca_set_void(data, uint32_t, delay); + } break; case UCA_PROP_DELAY_MAX: - uca_set_void(data, uint32_t, pco->description.dwMaxDelayDESC); + { + uint32_t delay = pco->description.dwMaxDelayDESC * 1000; + uca_set_void(data, uint32_t, delay); + } break; case UCA_PROP_EXPOSURE: { uint32_t delay; - return pco_get_delay_exposure(pco, &delay, (uint32_t *) data); + pco_get_delay_exposure(pco, &delay, (uint32_t *) data); } break; case UCA_PROP_EXPOSURE_MIN: - uca_set_void(data, uint32_t, pco->description.dwMinExposureDESC); + { + uint32_t exposure = pco->description.dwMinExposureDESC / 1000; + uca_set_void(data, uint32_t, exposure); + } break; case UCA_PROP_EXPOSURE_MAX: - uca_set_void(data, uint32_t, pco->description.dwMaxExposureDESC); + { + uint32_t exposure = pco->description.dwMaxExposureDESC * 1000; + uca_set_void(data, uint32_t, exposure); + } break; case UCA_PROP_BITDEPTH: -- cgit v1.2.3