summaryrefslogtreecommitdiffstats
path: root/src/uca.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-21 11:25:46 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-21 11:25:46 +0200
commitccaf5dfc7727ea32920527a7622509b9724ae42f (patch)
tree0a94f7a4a77b75fb83582de11005ab41221eea6c /src/uca.c
parent7e1ec3056d1fdb6786c452ba6ed7e978355a98c2 (diff)
downloaduca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.gz
uca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.bz2
uca-ccaf5dfc7727ea32920527a7622509b9724ae42f.tar.xz
uca-ccaf5dfc7727ea32920527a7622509b9724ae42f.zip
Add: readout state
Diffstat (limited to 'src/uca.c')
-rw-r--r--src/uca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/uca.c b/src/uca.c
index 191092c..59155cc 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -327,7 +327,7 @@ uint32_t uca_cam_register_callback(struct uca_camera *cam, uca_cam_grab_callback
uint32_t uca_cam_grab(struct uca_camera *cam, char *buffer, void *meta_data)
{
struct uca_camera_priv *priv = cam->priv;
- if (priv->state != UCA_CAM_RECORDING)
+ if ((priv->state != UCA_CAM_RECORDING) && (priv->state != UCA_CAM_READOUT))
return UCA_ERR_CAMERA | UCA_ERR_NOT_RECORDING;
return priv->grab(priv, buffer, meta_data);
}
@@ -339,6 +339,7 @@ uint32_t uca_cam_readout(struct uca_camera *cam)
return UCA_ERR_CAMERA | UCA_ERR_IS_RECORDING;
if (priv->readout == NULL)
return UCA_ERR_CAMERA | UCA_ERR_NOT_IMPLEMENTED;
+ priv->state = UCA_CAM_READOUT;
return priv->readout(priv);
}