Both your this last script and the lapser one (from the other topic) worked pretty well.
Let me know if you plan to use lapser's script and I'll leave this thread to him. No sense in both of us working on this separately.
Can you please lower the interval for something like 1.9 seconds? With lapser script I can get 1 pic every 1.9 seconds. I tried to figure this out in your (waterwiz) script but no luck.
I implemented the complete setup parameter list from the script you posted so you can now specify repeat rate down to the millisecond. I also changed the printout so that it tells you how far each shot is ahead/behind that rate.
* Be aware that part of the way lapser's script gets a short cycle time is to not make an exposure reading before every shot. I can add that but I'm not sure that's what you want with a UAV ?
the delay for start so It can take the first picture when its already flying.
Done - its now programmable via a setup value.
Set the focus to infinity" do you have already this one code? It sure will be very usefull for me since I will always use focus to infinity+lock.
Right now it will focus once after the startup delay completes. If the UAV is flying at that point then that should work for you ? I've had trouble with setting focus in a script with some cameras. However, we can give it a try if you like.
3) the shutdown - I have this script from conservation drones that has the shutdown, how can I integrate a shutdown after X minutes of X pictures on your script
Done. As a refinement, when it finishes shooting the camera switches to Playback mode. If you have the Canon lens retract time set to zero seconds it will thus secure the lens for landing.
A couple of other notes :1) If you start the script when the camera is in Playback mode, it will wait until your initial delay is up before it goes to shooting mode and extending the lens. Useful for protecting the camera if you have a "short flight" and "bounce".
2) If you set the script for autostart in the Script menu, then all you need to do when you are readly to launch your UAV is press the Playback button once. (see note 1 above)
3) I added a parameter to allow you to override the backlight disable so that you can see the timing messages during testing.
--[[
@title UAV Shooter 3.4
@param a Delay Start (Min)
@default a 0
@param b Delay Start (Sec)
@default b 20
@param c Number of Shots
@default c 50
@param d Interval (Min)
@default d 0
@param e Interval (Sec)
@default e 2
@param f Interval (1/10 Sec)
@default f 5
@param g Endless? No=0 Yes=1
@default g 0
@param l LCD off? Yes=0 No=1
@default l 0
--]]
function restore()
set_aflock(0)
set_record(0)
set_backlight(0)
end
interval=d*60000+e*1000+f*100
wait=a*60000+b*1000
shotcount=0
set_console_layout(1,1,40,13)
print("startup delay - LCD off")
sleep(1000)
set_backlight(l)
sleep(wait)
print("running")
if( get_mode() ==false ) then
set_record(1)
while ( get_mode() == false ) do
sleep(100)
end
end
press("shoot_half")
repeat sleep(100) until get_shooting() == true
release("shoot_half")
repeat sleep(100) until get_shooting() == false
set_aflock(1)
print("focus locked")
nextshot=get_tick_count()
starttime=nextshot
repeat
shotcount=shotcount+1
print ( "shot", shotcount, "at", ((get_tick_count()-starttime)/1000),"sec. Err=", (nextshot-get_tick_count()), "mSec" )
nextshot=nextshot+interval
shoot()
while ( nextshot > get_tick_count()) do
set_backlight(l)
sleep(100)
end
until ( (g==0) and (shotcount >= c))
restore()