From a4975dd460bc5b0a1e99cea756d8a9fe1e131fb2 Mon Sep 17 00:00:00 2001 From: Patrick Mansfield Date: Sat, 15 Feb 2003 20:10:47 +0000 Subject: [PATCH] * sierra.c, sierra.h: Add and use SIERRA_SKIP_INIT for use with Polaroid PDC 2300Z. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6204 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/sierra/ChangeLog | 5 +++++ camlibs/sierra/sierra.c | 11 ++++++----- camlibs/sierra/sierra.h | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/camlibs/sierra/ChangeLog b/camlibs/sierra/ChangeLog index f3f20fe07..0d9b99167 100644 --- a/camlibs/sierra/ChangeLog +++ b/camlibs/sierra/ChangeLog @@ -1,3 +1,8 @@ +2003-02-15 Patrick Mansfield + + * sierra.c, sierra.h: Add and use SIERRA_SKIP_INIT for use with + Polaroid PDC 2300Z. + 2003-02-15 Patrick Mansfield * epson-desc.c, library.c, nikon-desc.c olympus-desc.c diff --git a/camlibs/sierra/sierra.c b/camlibs/sierra/sierra.c index 5576a2459..e5ed117c1 100644 --- a/camlibs/sierra/sierra.c +++ b/camlibs/sierra/sierra.c @@ -158,7 +158,8 @@ static struct { SIERRA_WRAP_USB, &oly3040_cam_desc}, {"Panasonic", "Coolshot NV-DCF5E", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, {"Polaroid", "PDC 640", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, - {"Polaroid", "PDC 2300Z", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, + {"Polaroid", "PDC 2300Z", SIERRA_MODEL_DEFAULT, 0, + SIERRA_SKIP_INIT, 0 }, {"Sanyo", "DSC-X300", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, {"Sanyo", "DSC-X350", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, {"Sanyo", "VPC-G200", SIERRA_MODEL_DEFAULT, 0, 0, 0 }, @@ -2112,11 +2113,11 @@ camera_init (Camera *camera, GPContext *context) CHECK_FREE (camera, gp_port_set_timeout (camera->port, TIMEOUT)); /* - * Send initialization sequence. Do not do this for the - * 'Polaroid PDC 2300Z' (reported by William Bader - * ). + * Send initialization sequence unless otherwise flagged. (The + * 'Polaroid PDC 2300Z' fails sierra_init as reported by William + * Bader ). */ - if (strcmp (a.model, "Polaroid:PDC 2300Z")) + if (!(camera->pl->flags & SIERRA_SKIP_INIT)) CHECK (sierra_init (camera, context)); /* Establish a connection */ diff --git a/camlibs/sierra/sierra.h b/camlibs/sierra/sierra.h index dcbecdc5d..75fbc59ed 100644 --- a/camlibs/sierra/sierra.h +++ b/camlibs/sierra/sierra.h @@ -10,6 +10,7 @@ typedef enum { SIERRA_NO_51 = 1<<1, SIERRA_LOW_SPEED = 1<<2, SIERRA_EXT_PROTO = 1<<3, + SIERRA_SKIP_INIT = 1<<4, } SierraFlags; struct _CameraPrivateLibrary {