set_focus problem - page 3 - Script Writing - CHDK Forum  

set_focus problem

  • 27 Replies
  • 5521 Views
Re: set_focus problem
« Reply #20 on: 29 / June / 2012, 21:58:34 »
Advertisements
Quote
What happens if you do a click "shoot_half" instead of a shoot ?

If I didn't screw up below, the answer is no.  No matches (Set!=B4, Set!=Aft) when the following was run (on A800):

Code: [Select]
@title focusTest script
print "Focus Test2!"
for f=95 to 100
  set_focus f
  press "shoot_half"
  sleep 1000
  b=get_focus
  release "shoot_half"
  g=get_focus
  print "Set=",f," B4=",b," Aft=",g
next f
end

I then re-ran the original focus test (just in case there were user errors involved in the procedure) and things match (SetTo==Actual).

<later edit>
Uhm... I did screw up!  I noticed a difference between the two scripts (delay after set_focus).

The following works (Set==B4, Set==Aft).  "sleep 500" required after set_focus!:

Code: [Select]
@title focusTest2 script
print "Focus Test2!"
for f=95 to 100
  set_focus f
  sleep 500
  press "shoot_half"
  sleep 1000
  b=get_focus
  release "shoot_half"
  g=get_focus
  print "Set=",f," B4=",b," Aft=",g
next f
end

I then tried reducing the sleep 500 to sleep 50 and that failed again (Set!=B4, Set!=Aft).
« Last Edit: 29 / June / 2012, 22:25:14 by montana »

Re: set_focus problem
« Reply #21 on: 29 / June / 2012, 22:06:21 »
Quote
What happens if you do a click "shoot_half" instead of a shoot ?

If I didn't screw up below, the answer is no.  No matches (Set!=B4, Set!=Aft) when the following was run (on A800):

Code: [Select]
@title focusTest script
print "Focus Test2!"
for f=95 to 100
  set_focus f
  press "shoot_half"
  sleep 1000
  b=get_focus
  release "shoot_half"
  g=get_focus
  print "Set=",f," B4=",b," Aft=",g
next f
end

I then re-ran the original focus test (just in case there were user errors involved in the procedure) and things match (SetTo==Actual).
Interesting - thanks for trying that out.  Not sure what it means other than some things don't work the way I expected them to.   Maybe someone else will weigh in.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: set_focus problem
« Reply #22 on: 29 / June / 2012, 22:08:25 »
@waterwingz

See above edit that occurred while you replied.  shoot_half does work if you ensure there is a delay after set_focus.

Re: set_focus problem
« Reply #23 on: 29 / June / 2012, 22:30:54 »
See above edit that occurred while you replied.  shoot_half does work if you ensure there is a delay after set_focus.
So pretty much the same way you use set_aflock
Ported :   A1200    SD940   G10    Powershot N    G16


Re: set_focus problem
« Reply #24 on: 29 / June / 2012, 23:36:07 »
Quote
So pretty much the same way you use set_aflock

I'm not sure we are in sync.

Note that you need a delay after set_focus and before press "shoot_half".  The delay after "shoot_half" I added in because I assumed it would be required (didn't try removing it).

Code: [Select]

  set_focus f
  sleep 500           <<< oddly this delay is required
  press "shoot_half"
  sleep 1000          <<< this delay i put in because i assumed it would be required, didn't test without it
  b=get_focus

Re: set_focus problem
« Reply #25 on: 29 / June / 2012, 23:44:53 »
I'm not sure we are in sync.
What I was looking for was a sequence where you set something (  focus lock or set focus ) and then have it go active with a press "shoot_half"  or just do a shoot.

I think that's what we have ?


Ported :   A1200    SD940   G10    Powershot N    G16

Re: set_focus problem
« Reply #26 on: 30 / June / 2012, 01:38:37 »
Quote
What I was looking for was a sequence where you set something (  focus lock or set focus ) and then have it go active with a press "shoot_half"  or just do a shoot.

I think that's what we have ?

Okay.  Yes, shoot/shoot_half makes the set_focus happen. 

The required delay after set_focus seems to imply that the focus motor is turning before the shoot which I found odd.  If that is true, why is the shoot required?

Anyway, I don't really need an answer to that... I have a recipe that works now.  So on to the job of taking photos!

Re: set_focus problem
« Reply #27 on: 09 / July / 2012, 05:28:38 »
Ok. I will try anything that you mentioned in this thread and make reply to confirm success or not.
I simply need to have manualfocus because I am meteorolgist and I have to make photos of different types of clouds. Autofocus is good only for close things.


 

Related Topics