KAP & UAV Exposure Control Intervalometer Script - page 78 - Completed and Working Scripts - CHDK Forum supplierdeeply

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 410885 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #770 on: 14 / March / 2016, 08:53:41 »
Advertisements

Just tried the code modification you suggested (Deleted the exact lines you posted). The lens do exctract but only for about 4 seconds and then retract back again.
There is a script parameter that you can set to control this.  No code modifications required.  It's called

USB Timeout (secs 0=off)

Set it to zero.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #771 on: 16 / March / 2016, 11:06:38 »
It is already set at 0 when tha's happening.
Here's a vid to show you exactly what's it doing.
https://drive.google.com/file/d/0B-Ks32HaA8XZSk4yQmhGSlJfek0/view?usp=docslist_api

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #772 on: 17 / March / 2016, 12:14:29 »

It is already set at 0 when tha's happening.
Yea, deleting that code also requires one more small change to work properly.

Change line 144 from
       usb_shooting_mode = 0
to
       usb_shooting_mode = 1

Sorry for the mixup.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #773 on: 18 / March / 2016, 18:24:25 »
No problem, it works fine now -thanks
Now I can do some proper testing on the number of photos without worrying that I'm gonna miss one in the beginning.
Will keep you updated on the results.




Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #774 on: 20 / March / 2016, 06:27:13 »
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.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #775 on: 20 / March / 2016, 08:01:49 »
Hi,
I set the camera activate and retract by rc radio. However, lens retract after 60 sec. I would like the lens response without a delay. Any suggestion will be appriciated.

*

Offline srsa_4c

  • ******
  • 4451
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #776 on: 20 / March / 2016, 08:12:57 »
I set the camera activate and retract by rc radio. However, lens retract after 60 sec. I would like the lens response without a delay.
You can find that setting in the Canon menu.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #777 on: 20 / March / 2016, 11:20:13 »
I set the camera activate and retract by rc radio. However, lens retract after 60 sec. I would like the lens response without a delay.
You can find that setting in the Canon menu.
To be a little more specific,  the setting is usually in the Canon menu with the tools icon and says Lens Retract. Set it to 0 sec.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #778 on: 20 / March / 2016, 13:31:35 »
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.
Code: [Select]
                    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.
« Last Edit: 20 / March / 2016, 14:00:07 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #779 on: 23 / March / 2016, 15:05:08 »
Thank you alot for all the help and work. I tried what you suggested and I believe this will certainly help with the issue.
I also added a shut_down() function after the same "if" statement for the camera to shut down after the mapping is complete and protect the lens.
I'll try to have a test flight tommorow and post results.



 

Related Topics