Question:If I command the shoot button on a camera to be held down for k seconds in continuous shooting mode, what's the easiest way to tell how many photographs were taken? (I have thought of inspecting the file system on the camera, but I feel that this method would be slow.)
Long story:I need a way to determine the number of photos that are taken during a burst of continuous shooting for a script I am writing as part of a bus photography system. The system is supposed to take many photographs along a bus route and label each photograph with the geographic coordinates that it was taken at. It's comprised of a host computer that communicates with a SD880 camera and a GPS unit via USB using the PTP interface described here:
http://chdk.wikia.com/wiki/PTP_Extension. Naturally, the script runs on the host computer. The system takes photographs in bursts because it is faster than taking them individually.
My script has constants called SECS_PER_SHOT and SHOTS_PER_BURST, so for each burst the shoot button is pressed down for SECS_PER_SHOT * SHOTS_PER_BURST seconds, and I expect SHOTS_PER_BURST photos to be taken. However, due to precision issues SHOTS_PER_BURST photos are not taken on every burst, e.g. sometimes SHOTS_PER_BURST - 1 or SHOTS_PER_BURST + 1 are taken. I need to create one GPS label for each photo, but that requires knowing how many photos were actually taken.