I have a photo number discrepancy again. Pixhawk commanded 36 pics to be taken but 38 were actually shot.
Here is the link to the Flight log and KAP log : https://drive.google.com/folderview?id=0B-Ks32HaA8XZelJZYW1TZFdmelU&usp=sharing
Fist pic is: IMG_1811 Last pic: IMG_1848. I'd appreciate if you could take a look.
Thanks for posting those logs. It took a bit of work to figure out the pixhawk log but I eventually got it. And I'm pretty sure I know what is happening.
When operating the script in pixhawk mode, the first "shoot" pulse from the pixhawk starts the camera shooting in a simulated continuous mode (i.e. the script half-presses the shutter and holds it that way). Each subsequent shoot pulse causes a full-press sequence. This sequence repeats until either a cancel pulse is issued by the pixhawk or the pixhawk stops sending any pulses for five seconds.
The five second timeout was picked to be long enough based on the assumption the pixhawk would be shooting quite a bit faster than one frame every two seconds.
When I look at your pixhawk & script logs, I can see that the pixhawk calls for shots every two to three seconds. Sometimes it delays for a bit more than four seconds. And sometimes it stops sending any pulsed for about five seconds. So I think we are on what engineers call
"the hairy edge" from a timing perspective.
If I'm correct here, this should be easy to fix - with one caveat.
Simply change the 5000 value in line 823 of the script to something like 20000.
if not wait_for_shoot_pulse(5000) then
But here's the rub - you will always end up with one extra shot right at the end. Easy enough to delete if you are aware of what happened. When shooting in continuous mode, the script sets up the next shot immediately and then waits for the pixhawk to release it. If no signal from the pixhawk arrives then the script times out and releases the final shot. Unfortunately, there is no easy way to cancel that shot - it's already setup and waiting to go. But it should be easy to deal with "post shooting".
EDIT : IIRC, the other reason for the five second timeout was to allow the pixhawk to "reset" exposure & focus at the end of each aerial photo pass. Whether that's beneficial or not depends on your shooting needs and situation I guess.