From: <mar...@us...> - 2013-04-11 10:09:15
|
Revision: 14325 http://sourceforge.net/p/gphoto/code/14325 Author: marcusmeissner Date: 2013-04-11 10:09:10 +0000 (Thu, 11 Apr 2013) Log Message: ----------- handle out of focus on some nikon variants Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/library.c Modified: trunk/libgphoto2/camlibs/ptp2/library.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/library.c 2013-04-11 08:25:22 UTC (rev 14324) +++ trunk/libgphoto2/camlibs/ptp2/library.c 2013-04-11 10:09:10 UTC (rev 14325) @@ -2273,13 +2273,16 @@ CR (gp_port_set_timeout (camera->port, capture_timeout)); - newobject = 0xffff0001; - while (ptp_nikon_device_ready(params) != PTP_RC_OK) { + while ((ret = ptp_nikon_device_ready(params)) == PTP_RC_DeviceBusy) { gp_context_idle (context); /* do not drain all of the DSLRs compute time */ usleep(100*1000); /* 0.1 seconds */ } + if (ret != PTP_RC_OK) /* e.g. out of focus gets reported here. */ + return ret; + + newobject = 0xffff0001; while (1) { PTPContainer event; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |