Skip to content

Commit

Permalink
reenable the objecthandles logic, as reportedly only the
Browse files Browse the repository at this point in the history
first ObjhectAdded event is received

gphoto#133
  • Loading branch information
msmeissn committed May 12, 2017
1 parent 124b48d commit e70c2f5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions camlibs/ptp2/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -3929,20 +3929,16 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
{
PTPParams *params = &camera->pl->params;
PTPPropertyValue propval;
#if 0
PTPObjectHandles handles, beforehandles;
int tries;
#endif
PTPContainer event;
uint32_t newobject;
struct timeval event_start;
int back_off_wait = 0;

GP_LOG_D ("camera_fuji_capture");

#if 0
C_PTP (ptp_getobjecthandles (params, PTP_HANDLER_SPECIAL, 0x000000, 0x000000, &beforehandles));
#endif

/* focus */
propval.u16 = 0x0200;
Expand Down Expand Up @@ -3983,12 +3979,8 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
break;
}
}
} while (waiting_for_timeout (&back_off_wait, event_start, 2000)); /* wait for 2 more seconds after busy is no longer signaled */
} while (waiting_for_timeout (&back_off_wait, event_start, 500)); /* wait for 0.5 seconds after busy is no longer signaled */

return GP_ERROR;


#if 0
/* If we got no event in 2 seconds duplicate the nikon broken capture, as we do not know how to get events yet */

tries = 5;
Expand Down Expand Up @@ -4036,7 +4028,6 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
free (beforehandles.Handler);
if (!newobject)
GP_LOG_D ("fuji object added no new file found after 5 seconds?!?");
#endif

downloadfile:
/* clear path, so we get defined results even without object info */
Expand Down

0 comments on commit e70c2f5

Please sign in to comment.