diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-10-19 14:29:57 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-10-19 14:29:57 +0200 |
commit | 338c435be149cdc0a64e548d3ff3a86d12b1ac38 (patch) | |
tree | 1fac47f734c5746d545f730d5a05c73eb3c74669 /src/cameras | |
parent | f4447a4d02d21c4820d8e469b27f308326f77922 (diff) | |
download | uca-338c435be149cdc0a64e548d3ff3a86d12b1ac38.tar.gz uca-338c435be149cdc0a64e548d3ff3a86d12b1ac38.tar.bz2 uca-338c435be149cdc0a64e548d3ff3a86d12b1ac38.tar.xz uca-338c435be149cdc0a64e548d3ff3a86d12b1ac38.zip |
Fix: timestamp mode
Diffstat (limited to 'src/cameras')
-rw-r--r-- | src/cameras/pco.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/cameras/pco.c b/src/cameras/pco.c index fd277af..955ee6d 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -90,7 +90,21 @@ static uint32_t uca_pco_set_property(struct uca_camera_priv *cam, enum uca_prope return uca_pco_set_delay(cam, (uint32_t *) data); case UCA_PROP_TIMESTAMP_MODE: - return pco_set_timestamp_mode(GET_PCO(cam), *((uint16_t *) data)); + { + uint32_t mode = *((uint32_t *) data); + if (mode & UCA_TIMESTAMP_ASCII) { + if (mode & UCA_TIMESTAMP_BINARY) + return pco_set_timestamp_mode(GET_PCO(cam), TIMESTAMP_MODE_BINARYANDASCII); + else { + printf("hello\n"); + return pco_set_timestamp_mode(GET_PCO(cam), TIMESTAMP_MODE_ASCII); + } + } + else if (mode & UCA_TIMESTAMP_BINARY) + return pco_set_timestamp_mode(GET_PCO(cam), TIMESTAMP_MODE_BINARY); + else + return pco_set_timestamp_mode(GET_PCO(cam), TIMESTAMP_MODE_OFF); + } case UCA_PROP_HOTPIXEL_CORRECTION: return pco_set_hotpixel_correction(GET_PCO(cam), *(uint32_t *) data); @@ -318,9 +332,9 @@ uint32_t uca_pco_init(struct uca_camera_priv **cam, struct uca_grabber_priv *gra pco_set_scan_mode(pco, PCO_SCANMODE_SLOW); pco_set_rec_state(pco, 0); - pco_set_timestamp_mode(pco, UCA_TIMESTAMP_ASCII); + pco_set_timestamp_mode(pco, TIMESTAMP_MODE_ASCII); pco_set_timebase(pco, 1, 1); - pco_arm_camera(pco); + /* pco_arm_camera(pco); */ /* Prepare frame grabber for recording */ int val = 0; |