diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-12-14 16:20:24 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-12-14 16:20:24 +0100 |
commit | bd7013de1e06a759e519ee5f9c203f4c03f25e83 (patch) | |
tree | df626c06f0320dab6aaf01f665c6a96d206312b9 /src/cameras | |
parent | 29b0567b035ec45c1d78423a8d96821cdaf85787 (diff) | |
download | uca-bd7013de1e06a759e519ee5f9c203f4c03f25e83.tar.gz uca-bd7013de1e06a759e519ee5f9c203f4c03f25e83.tar.bz2 uca-bd7013de1e06a759e519ee5f9c203f4c03f25e83.tar.xz uca-bd7013de1e06a759e519ee5f9c203f4c03f25e83.zip |
Add: pco.4000 support
Diffstat (limited to 'src/cameras')
-rw-r--r-- | src/cameras/pco.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 00ceee5..12b71f7 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -295,7 +295,7 @@ static uint32_t uca_pco_grab(struct uca_camera_priv *cam, char *buffer, void *me pco_desc_t *pco_d = GET_PCO_DESC(cam); pco_handle pco = pco_d->pco; - if (cam->state == UCA_CAM_READOUT && pco_d->type == CAMERATYPE_PCO_DIMAX_STD) { + if (cam->state == UCA_CAM_READOUT) { if (pco_d->current_image == pco_d->num_recorded_images) return UCA_ERR_NO_MORE_IMAGES; @@ -389,17 +389,33 @@ uint32_t uca_pco_init(struct uca_camera_priv **cam, struct uca_grabber_priv *gra /* Prepare frame grabber for recording */ int val = 0; - if (pco_d->type == CAMERATYPE_PCO_EDGE) - val = UCA_CL_8BIT_FULL_10; - else if (pco_d->type == CAMERATYPE_PCO_DIMAX_STD) - val = UCA_CL_SINGLE_TAP_8; + switch (pco_d->type) { + case CAMERATYPE_PCO_EDGE: + val = UCA_CL_8BIT_FULL_10; + break; + case CAMERATYPE_PCO_DIMAX_STD: + val = UCA_CL_SINGLE_TAP_8; + break; + case CAMERATYPE_PCO4000: + val = UCA_CL_SINGLE_TAP_16; + break; + default: + break; + } grabber->set_property(grabber, UCA_GRABBER_CAMERALINK_TYPE, &val); val = 0; - if (pco_d->type == CAMERATYPE_PCO_EDGE) - val = UCA_FORMAT_GRAY8; - else if (pco_d->type == CAMERATYPE_PCO_DIMAX_STD) - val = UCA_FORMAT_GRAY16; + switch (pco_d->type) { + case CAMERATYPE_PCO_EDGE: + val = UCA_FORMAT_GRAY8; + break; + case CAMERATYPE_PCO_DIMAX_STD: + case CAMERATYPE_PCO4000: + val = UCA_FORMAT_GRAY16; + break; + default: + break; + } grabber->set_property(grabber, UCA_GRABBER_FORMAT, &val); val = UCA_TRIGGER_AUTO; |