Focus bracketing scripts sometimes stops at "shoot" command - page 2 - Script Writing - CHDK Forum supplierdeeply

Focus bracketing scripts sometimes stops at "shoot" command

  • 76 Replies
  • 9307 Views
*

Offline tonyb

  • *
  • 14
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #10 on: 20 / December / 2012, 21:15:03 »
Advertisements
@lapser, where do you plug those lines of code?

*

Offline lapser

  • *****
  • 1093
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #11 on: 21 / December / 2012, 00:45:13 »
@lapser, where do you plug those lines of code?
Sorry, that was in Lua. I don't speak ubasic. But this is what I meant:
Code: [Select]
press "shoot_half"
do
    sleep 50
until get_shooting = 1
click "shoot_full_only"
release "shoot_half"
do
    sleep 50
until get_shooting = 0
I think you need to wait for get_shooting to go back to 0 after you release shoot_half. I looked through the shoot() code today and it looks like it is doing that, but there may be a timeout that messes it up on occasion.

I haven't been able to get shoot() to mess up on my camera, so it's hard to test. Anyway, try this and see if it works.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline dvip

  • ****
  • 451
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #12 on: 21 / December / 2012, 01:35:29 »
This worked (A590IS-101b). Did a quick focus bracketing test in macro mode:

@title Focus bracketing
@param n Max number of steps
@default n 10
  sleep 2000
  for s=1 to n
  press "shoot_half"
  do
    sleep 50
    until get_shooting = 1
    click "shoot_full_only"
    release "shoot_half"
  do
    sleep 50
     until get_shooting = 0
   get_focus f
   get_dof d
   g=f+d*2/3
   set_focus g
   sleep 1500   
   print g,d
   if g>50000 then s=n
   if d<0 then s=n
  next s
end

*

Offline lapser

  • *****
  • 1093
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #13 on: 21 / December / 2012, 12:44:20 »
That's interesting. I think I'm closing in on the cause of the shoot() bug. Will you try it again with shoot() instead of click/release?

By the way, click "shoot_full" also does release "shoot_half" if you want to kill two birds with one stone (do it in one statement).
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


*

Offline dvip

  • ****
  • 451
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #14 on: 21 / December / 2012, 14:03:48 »
@lapser, yes it works with shoot, and so does this:

@param d near focus (mm)
@default d 2500
@param e far focus (mm)
@default e 4500
@param f Steps (mm)
@default f 100

for i=d to e step f
     set_focus i
     shoot
next i


*

Offline lapser

  • *****
  • 1093
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #15 on: 21 / December / 2012, 14:48:54 »
@dvip,

OK, it works all the time for you then? @skrylten had the problem when also using the built-in flash, I think. Maybe that would trigger the bug.

What I'd like to see is a script that triggers the bug with shoot(), but works correctly by delaying until get_shooting goes back to 0 after shoot().
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline dvip

  • ****
  • 451
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #16 on: 21 / December / 2012, 15:48:11 »
@lapser,
No bug here, and I was shooting jpg+raw at the same time.
Just used CombineZM Image Stacking Software with the jpg images and it works great. I don't use image stacking much but it sure is nice to have.

Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #17 on: 22 / December / 2012, 14:46:17 »
@lapser
The first script work without flash, but stops randomly with flash.
The script with 2 sleep commands in Reply #8, works with flash.

The first script with a wait for get_shooting still doesn´t work ....
---------------------------------
rem Leif Karlsson
@title Focus bracketing
@param n Max number of steps
@default n 300

sleep 2000

  for s=1 to n
   shoot
   do
      sleep 50
   until get_shooting = 0
   get_focus f
   get_dof d
   g=f+d*2/3
   set_focus g
   print g,d
   if g>50000 then s=n
   if d<0 then s=n
  next s

end


*

Offline lapser

  • *****
  • 1093
Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #18 on: 23 / December / 2012, 00:46:21 »
@lapser
The first script with a wait for get_shooting still doesn´t work ....
OK, thanks. That's not the problem with shoot() then. The solution is to avoid shoot(), but I'm still not sure why shoot() doesn't work.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Focus bracketing scripts sometimes stops at "shoot" command
« Reply #19 on: 23 / December / 2012, 03:40:42 »
The script in #8 did´t work without the two sleep commands, so its not only shoot that has my problem...
I will see if I can narrow it down somehow.
What are the conditions that have to be met, to make a succesful shoot ?
Flash ready, focus ready etc .
Is it possible to print them in the script to see whats different when the script stops ?

 

Related Topics