From 0b31ba02c1a3ffd75c8a1fae19b0d9c06c358fee Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Mon, 5 Nov 2001 15:00:54 +0000 Subject: [PATCH] =?UTF-8?q?2001-11-05=20=20Lutz=20M=EF=BF=BDller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * camlibs/polaroid/pdc700.c: Timeout = 2sec, try each speed 2 times. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2915 67ed7778-7388-44ab-90cf-0a291f65f57c --- ChangeLog | 4 ++++ camlibs/polaroid/pdc700.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 079672932..fff98e3e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-11-05 Lutz Müller + + * camlibs/polaroid/pdc700.c: Timeout = 2sec, try each speed 2 times. + 2001-11-05 Lutz Müller * camlibs/sierra/PROTOCOL: Updated (upload). diff --git a/camlibs/polaroid/pdc700.c b/camlibs/polaroid/pdc700.c index 3de98cf7d..d6c91453b 100644 --- a/camlibs/polaroid/pdc700.c +++ b/camlibs/polaroid/pdc700.c @@ -396,19 +396,22 @@ camera_init (Camera *camera) /* Check if the camera is really there */ CHECK_RESULT (gp_port_get_settings (camera->port, &settings)); - CHECK_RESULT (gp_port_set_timeout (camera->port, 1000)); + CHECK_RESULT (gp_port_set_timeout (camera->port, 2000)); for (i = 0; i < 5; i++) { settings.serial.speed = speeds[i]; CHECK_RESULT (gp_port_set_settings (camera->port, settings)); result = pdc700_init (camera->port); if (result == GP_OK) break; + result = pdc700_init (camera->port); + if (result == GP_OK) + break; } - if (i == 4) + if (i == 5) return (result); /* Set the speed to the highest one */ - if (speeds[i] != 57600) { + if (speeds[i] < 57600) { CHECK_RESULT (pdc700_baud (camera->port, 57600)); settings.serial.speed = 57600; CHECK_RESULT (gp_port_set_settings (camera->port, settings));