summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2014-01-28 12:21:35 +0100
committerSuren A. Chilingaryan <csa@suren.me>2014-01-28 12:21:35 +0100
commitf83e1d4082d4a7b5802ca665acab088dcea52863 (patch)
tree9e570a9912a98e627c862448f6396a8fcdd7eff5
parent0f41a2e0c38d66dc6af89d3a59a573b9a38f7ceb (diff)
downloadpcitool-f83e1d4082d4a7b5802ca665acab088dcea52863.tar.gz
pcitool-f83e1d4082d4a7b5802ca665acab088dcea52863.tar.bz2
pcitool-f83e1d4082d4a7b5802ca665acab088dcea52863.tar.xz
pcitool-f83e1d4082d4a7b5802ca665acab088dcea52863.zip
Properly support triggering with new revision of UFO camera
-rw-r--r--ipecamera/ipecamera.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipecamera/ipecamera.c b/ipecamera/ipecamera.c
index 54df33f..605d733 100644
--- a/ipecamera/ipecamera.c
+++ b/ipecamera/ipecamera.c
@@ -647,11 +647,12 @@ int ipecamera_trigger(pcilib_context_t *vctx, pcilib_event_t event, size_t trigg
GET_REG(status3_reg, value);
} while (value&0x20000000);
*/
-
- SET_REG(control_reg, IPECAMERA_FRAME_REQUEST|IPECAMERA_READOUT_FLAG);
+
+ GET_REG(control_reg, value);
+ SET_REG(control_reg, value|IPECAMERA_FRAME_REQUEST);
usleep(IPECAMERA_WAIT_FRAME_RCVD_TIME);
//CHECK_REG(status_reg, IPECAMERA_EXPECTED_STATUS);
- SET_REG(control_reg, IPECAMERA_IDLE|IPECAMERA_READOUT_FLAG);
+ SET_REG(control_reg, value);
pcilib_calc_deadline(&ctx->next_trigger, IPECAMERA_NEXT_FRAME_DELAY);