diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2019-06-26 15:44:07 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2019-06-26 15:44:07 +0200 |
commit | fe8f50e83a90aeed88149f8091f252f4e56f5a15 (patch) | |
tree | d10870171d3865aeb8240ea2ed6c3a6e437358ef | |
parent | f9f73ac12238ff0ed265a51d0d6bafa0430c5524 (diff) | |
download | libgphoto2-fe8f50e83a90aeed88149f8091f252f4e56f5a15.tar.gz |
merge waitBulb into the capture function
-rw-r--r-- | camlibs/lumix/lumix.c | 13 |
1 files 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); } |