diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-10-20 13:55:27 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-10-20 13:55:27 +0200 |
commit | f3fdc154a50516dc969942594e884cd0be0b29d0 (patch) | |
tree | 53cc7bb6c5ec63f9f3e810bb0f8e86018cd177b4 /src/cameras/pco.c | |
parent | 338c435be149cdc0a64e548d3ff3a86d12b1ac38 (diff) | |
download | uca-f3fdc154a50516dc969942594e884cd0be0b29d0.tar.gz uca-f3fdc154a50516dc969942594e884cd0be0b29d0.tar.bz2 uca-f3fdc154a50516dc969942594e884cd0be0b29d0.tar.xz uca-f3fdc154a50516dc969942594e884cd0be0b29d0.zip |
Expose pco triggers
Diffstat (limited to 'src/cameras/pco.c')
-rw-r--r-- | src/cameras/pco.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 955ee6d..e7ef365 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -44,6 +44,7 @@ static uint32_t uca_pco_set_delay(struct uca_camera_priv *cam, uint32_t *delay) static uint32_t uca_pco_destroy(struct uca_camera_priv *cam) { + cam->grabber->stop_acquire(cam->grabber); pco_set_rec_state(GET_PCO(cam), 0); pco_destroy(GET_PCO(cam)); free(GET_PCO_DESC(cam)); @@ -89,16 +90,20 @@ static uint32_t uca_pco_set_property(struct uca_camera_priv *cam, enum uca_prope case UCA_PROP_DELAY: return uca_pco_set_delay(cam, (uint32_t *) data); + case UCA_PROP_TRIGGER_MODE: + /* XXX: We have a 1:1 mapping between UCA_TRIGGER_* and + * TRIGGER_MODE_* + */ + return pco_set_trigger_mode(GET_PCO(cam), (uint16_t) *(uint32_t *) data); + case UCA_PROP_TIMESTAMP_MODE: { 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"); + else 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); |