From fe8f50e83a90aeed88149f8091f252f4e56f5a15 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 26 Jun 2019 15:44:07 +0200 Subject: merge waitBulb into the capture function --- camlibs/lumix/lumix.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c index 5fa5dd212..3f8652e31 100644 --- a/camlibs/lumix/lumix.c +++ b/camlibs/lumix/lumix.c @@ -934,13 +934,6 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context) return GP_OK; } -static int -waitBulb(Camera *camera, long Duration ) { - sleep(Duration); // Sleep for the duration to simulate exposure, if this is in Bulb mode - loadCmd(camera,SHUTTERSTOP); - return TRUE; -} - static char* processNode(xmlTextReaderPtr reader) { char* ret =""; @@ -1171,10 +1164,12 @@ ReadImageFromCamera(Camera *camera, CameraFilePath *path, GPContext *context) { int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context); int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context){ loadCmd(camera,SHUTTERSTART); //we should really multithread so as to not block while waiting - sleep(4); + if (strcmp(cameraShutterSpeed, "B")!=0) { - waitBulb(camera,captureDuration);//trying captureDuration sec to start before we know how to make a bulb capture of x sec .... + sleep(captureDuration); // Sleep for the duration to simulate exposure, if this is in Bulb mode } + + loadCmd(camera,SHUTTERSTOP); return ReadImageFromCamera(camera, path, context); } -- cgit v1.2.1