Lock focus in a script - page 2 - Script Writing - CHDK Forum

Lock focus in a script

  • 20 Replies
  • 10580 Views
Re: Lock focus in a script
« Reply #10 on: 26 / February / 2010, 19:38:29 »
Advertisements
Peabody, you're right, the set_aflock() does nothing if I turn off the display :( Grr!

Do you have a nice solution for an external battery?

No that's not what I meant.  aflock should still work with the display off.  It does on my camera.  But it doesn't prevent the camera from going through the motions of focusing before coming back to where it started.

If I start the script with the display off and  the camera in normal autofocus mode, this will set the autofocus based on what's in the frame when it's executed:

sleep 2500
press "shoot_half"
sleep 2500
set_aflock(1)
release "shoot_half"

After that, you can either "shoot_full" or "shoot" for each frame, and the focus will stay locked.  I just don't like all the mechanical noise I hear when it's doing that.

An external battery pack could be two C or D cells and a holder for them.  Then you would need the right connector for the DC-In socket on the camera.  It might be a 2.35 x 0.7 mm connector, which would probably be an EIAJ-01.  In the US, that might be available through Radio Shack:

http://www.radioshack.com/product/index.jsp?productId=3807936


*

fma

Re: Lock focus in a script
« Reply #11 on: 27 / February / 2010, 03:57:43 »
I made a test, and yes, it works as you describe.

And thanks for the tips for the battery; I have such connector :)

*

Offline CyberianIce

  • *
  • 16
  • Comrade (:
Re: Lock focus in a script
« Reply #12 on: 08 / March / 2010, 17:47:32 »
Why one need such a script? Focus lock via Canon traditional way wont work? Or You did not read the Canon manual?
Canon PowerShot A560 + CHDK

*

fma

Re: Lock focus in a script
« Reply #13 on: 09 / March / 2010, 01:46:26 »
Canon AF lock is disabled when you switch the display off.

*

Offline CyberianIce

  • *
  • 16
  • Comrade (:
Re: Lock focus in a script
« Reply #14 on: 10 / March / 2010, 17:13:18 »
So, now I'm wondering why one need to take a pictures with Display switched off?
Canon PowerShot A560 + CHDK

*

fma

Re: Lock focus in a script
« Reply #15 on: 11 / March / 2010, 01:52:07 »
To save batteries... Timelapse shooting can take several hours.

*

Offline reyalp

  • ******
  • 14128
Re: Lock focus in a script
« Reply #16 on: 11 / March / 2010, 02:09:57 »
If you want to lock focus at infinity, and the camera is digic III/IV, you may be able to do this by setting propcase 6 to 3 http://chdk.wikia.com/wiki/Propertycase
Don't forget what the H stands for.

*

fma

Re: Lock focus in a script
« Reply #17 on: 11 / March / 2010, 02:39:33 »
Thanks, I'll try it.

*

Offline abhay

  • *
  • 30
Re: Lock focus in a script
« Reply #18 on: 05 / October / 2010, 03:16:18 »
so i have to add the above lines at the top of my script file, eg the motion detection etc, it will work for macro mode?
CanonIxus 95IS/sd1200

*

Offline CyberianIce

  • *
  • 16
  • Comrade (:
Re: Lock focus in a script
« Reply #19 on: 20 / December / 2010, 02:35:58 »
To save batteries... Timelapse shooting can take several hours.

Timelapse shooting I usually do with external power supply 3.15V DC attached to the Camera.
Canon PowerShot A560 + CHDK

 

Related Topics


SimplePortal © 2008-2014, SimplePortal