diff options
author | Hubert Figuiere <hub@figuiere.net> | 2003-12-03 13:08:57 +0000 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2003-12-03 13:08:57 +0000 |
commit | 0a00b03db580e958aa989b8972bd06fa020d0984 (patch) | |
tree | 86b9200c9c9671bb972515d03e7f31048bdf1d35 /camlibs/casio | |
parent | bee96ecb0caf7422035ae3d5a3e3a8863d8e286a (diff) | |
download | libgphoto2-0a00b03db580e958aa989b8972bd06fa020d0984.tar.gz |
* casio-qv.c (camera_init): hardcode speed to 9600 bauds
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6938 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/casio')
-rw-r--r-- | camlibs/casio/ChangeLog | 4 | ||||
-rw-r--r-- | camlibs/casio/casio-qv.c | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/camlibs/casio/ChangeLog b/camlibs/casio/ChangeLog index c458a1f3b..00add16ea 100644 --- a/camlibs/casio/ChangeLog +++ b/camlibs/casio/ChangeLog @@ -1,3 +1,7 @@ +2003-12-03 Hubert Figuiere <hfiguiere@teaser.fr> + + * casio-qv.c (camera_init): hardcode speed to 9600 bauds + 2003-09-05 Hubert Figuiere <hfiguiere@teaser.fr> * PROTOCOL.txt: added protocol description diff --git a/camlibs/casio/casio-qv.c b/camlibs/casio/casio-qv.c index 05eb7c00c..e8fabfa0f 100644 --- a/camlibs/casio/casio-qv.c +++ b/camlibs/casio/casio-qv.c @@ -216,7 +216,6 @@ camera_init (Camera *camera, GPContext *context) { int result = GP_OK, i; gp_port_settings settings; - int speeds[] = {9600, 115200, 57600, 38400, 19200}; /* First, set up all the function pointers */ camera->functions->summary = camera_summary; @@ -231,15 +230,10 @@ camera_init (Camera *camera, GPContext *context) /* 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)); - for (i = 0; i < 5; i++) { - settings.serial.speed = speeds[i]; - CHECK_RESULT (gp_port_set_settings (camera->port, settings)); - result = QVping (camera); - if (result >= GP_OK) - break; - } - if (i == 5) - return (result); + /* speed is hardcoded to 9600 as per the protocol */ + settings.serial.speed = 9600; + CHECK_RESULT (gp_port_set_settings (camera->port, settings)); + result = QVping (camera); - return (GP_OK); + return (result); } |