Full-press without releasing half-press - page 3 - General Discussion and Assistance - CHDK Forum

Full-press without releasing half-press

  • 27 Replies
  • 19789 Views
*

Offline dvip

  • ****
  • 451
Re: Full-press without releasing half-press
« Reply #20 on: 27 / September / 2011, 19:18:24 »
Advertisements
Very nice!
So what's the official lua script to test this?

« Last Edit: 27 / September / 2011, 19:19:59 by dvip »

Re: Full-press without releasing half-press
« Reply #21 on: 27 / September / 2011, 20:34:34 »
Very nice!
So what's the official lua script to test this?
Here you go,  this is < msl's interval shoot > script from 11-July-2011 converted to Lua.  The results are impressive - with no shooting the loops take 12 seconds,  with shoot_full_only() they take 12.9 seconds while using shoot() takes 23.2 seconds on my G10.

Code: [Select]
--[[
@title Interval shooting

@param a Shoot count
@default a 5
@param b Interval (Minutes)
@default b 0
@param c Interval (Seconds)
@default c 3
--]]

set_console_layout(10, 0, 40, 14)

t=b*60000+c*1000
if a<2 then a=10 end
if t<1000 then t=1000 end

sleep(2000)

k = get_tick_count()
print("Shoot 1 of", a)
shoot()

for n=2,a do
    sleep(t)
    print("Shoot", n, "of", a)
    shoot()
end
l = get_tick_count() - k

sleep(2000)

m = get_tick_count()
print("Shoot 1 of", a)
click("shoot_full_only")

press("shoot_half")
for n=2,a do
    sleep(t)
    print("Shoot", n, "of", a)
    click("shoot_full_only")
end
release("shoot_half")
n = get_tick_count() - m

print("interval", t * (a-1), "ms")
print("shoot", l, "ms")
print("shoot only", n, "ms")

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline dvip

  • ****
  • 451
Re: Full-press without releasing half-press
« Reply #22 on: 27 / September / 2011, 22:16:38 »
waterwingz,
It is great!
I just tested it in my A590is (a590-101b-0.9.9-1344-full.zip).

Thanks!

Now what  I'm looking for is,  a short lua script that can:

1. Focus
2. Lock focus
3. Allow some time for composition
4. Shoot (without refocusing)



Re: Full-press without releasing half-press
« Reply #23 on: 27 / September / 2011, 22:34:18 »
Now what  I'm looking for is,  a short lua script that can:
1. Focus
2. Lock focus
3. Allow some time for composition
4. Shoot (without refocusing)
Something like :
Code: [Select]
--[[
@title Focus Lock
@param a = delay (sec)
@default a 10
--]]

sleep(1000)
press("shoot_half")
repeat sleep(50) until get_shooting() == true
release("shoot_half")
repeat sleep(50) until get_shooting() == false

set_aflock(1)
sleep(a*1000)
shoot()
set_aflock(0)

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline dvip

  • ****
  • 451
Re: Full-press without releasing half-press
« Reply #24 on: 27 / September / 2011, 23:30:42 »
Very nice, waterwing! :D

It works great.
I like the fact that I can change the number of seconds to re-compose.

I noticed the cam turns the af-assist-beam led twice before locking focus.

Re: Full-press without releasing half-press
« Reply #25 on: 27 / September / 2011, 23:43:11 »
I noticed the cam turns the af-assist-beam led twice before locking focus.
Hmmm ... set_aflock(1) also seems to focus rather than just lock the current focus point.  Hence the two af-assist-beams you saw.   Looks like you can probably delete the code between the sleep(1000) and set_aflock(1) and it would work the same way.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline dvip

  • ****
  • 451
Re: Full-press without releasing half-press
« Reply #26 on: 28 / September / 2011, 20:00:57 »
--[[
@title Focus Lock
@param a = delay (sec)
@default a 3
--]]
sleep(1000)
set_aflock(1)
sleep(a*1000)
shoot()
set_aflock(0)

Yep, set_aflock(1) can focus. But I don't get the green square that confirms the focus, just a white one. But I still like it.

Re: Full-press without releasing half-press
« Reply #27 on: 28 / September / 2011, 21:45:39 »
short scripts that do what you want them to are always good
Ported :   A1200    SD940   G10    Powershot N    G16


 

Related Topics