From af765c855c94bb67ab3ba724aa2cb2cbe3c37e8d Mon Sep 17 00:00:00 2001 From: Nathan Stenzel Date: Mon, 17 Sep 2001 00:04:01 +0000 Subject: [PATCH] Set the timeout to 3 seconds (I think) Commented out the delete command test code. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2265 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/polaroid/pdc320.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/camlibs/polaroid/pdc320.c b/camlibs/polaroid/pdc320.c index b719c88c5..26e173e45 100644 --- a/camlibs/polaroid/pdc320.c +++ b/camlibs/polaroid/pdc320.c @@ -194,18 +194,15 @@ pdc320_delete (CameraPort *port) find out how many bytes to read. * Now, let's see how many bytes it reads before it times out. : ) */ +/* CHECK_RESULT (gp_port_read (port, buf, 1)); CHECK_RESULT (gp_port_read (port, buf, 1)); CHECK_RESULT (gp_port_read (port, buf, 1)); - CHECK_RESULT (gp_port_read (port, buf, 1)); - +*/ + CHECK_RESULT (gp_port_read (port, buf, 3)); #if 0 if ((buf[0] != 0x08) || (buf[1] != 0xf7) || - (buf[2] != 0xff) || - (buf[3] != 0x09) || - (buf[4] != 0xf6) || - (buf[5] != 0xff) || - (buf[6] != 0x00)) + (buf[2] != 0xff)) return (GP_ERROR_CORRUPTED_DATA); #endif @@ -475,7 +472,7 @@ camera_init (Camera *camera) else settings.serial.speed = 115200; CHECK_RESULT (gp_port_settings_set (camera->port, settings)); - CHECK_RESULT (gp_port_timeout_set (camera->port, 15000)); + CHECK_RESULT (gp_port_timeout_set (camera->port, 30000)); /* Check if the camera is really there */ CHECK_RESULT (pdc320_init (camera->port)); @@ -495,3 +492,4 @@ camera_init (Camera *camera) +