set_focus command not working on SX130 1.01c - General Discussion and Assistance - CHDK Forum

set_focus command not working on SX130 1.01c

  • 5 Replies
  • 8782 Views
set_focus command not working on SX130 1.01c
« on: 23 / July / 2011, 22:33:48 »
Advertisements
Hello fellow CHDK lovers, especially those who love the ability to use/write scripts!

I think I found a little but nasty bug with the SX130 version of CHDK:

Many scripts that I love have an option to set focus to infinity at the beginning of a shoot session, then lock it there for the rest of the shooting. I think mainly about some nice intervalometers.

Unfortunately, the set_focus command does not seem to have any effect.

So please, try this little test script I wrote, tell me if you experience the same problem as I do.

So maybe some guru will spend few minutes fixing this thing for us, poor humans.  :haha

Thank you all!

Jeff
« Last Edit: 23 / July / 2011, 22:48:26 by NovaJeff »
La parcimonie, c'est bien beau, mais faut pas trop en mettre.

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: set_focus command not working on SX130 1.01c
« Reply #1 on: 31 / October / 2011, 08:13:17 »
Hi,

Did anything come of this? Just curious.

Esmail

*

Offline philmoz

  • *****
  • 3450
    • Photos
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: set_focus command not working on SX130 1.01c
« Reply #3 on: 31 / October / 2011, 17:55:52 »
http://chdk.setepontos.com/index.php?topic=5691.msg70733#msg70733

Thanks Phil - I do have a question about the semantics of set_aflock 1. Your post that you referenced said:

"Try putting the 'set_aflock 1' before the 'set_focus 65535' ..."

The way I understood it what  set_af_lock does based in its name, it locks the current focus, so it would have made sense to me to set the focus first to what you want, and then lock it.

However, the way you have it, suggests that set_aflock 1 really disables autofocus, so that if you set focus to something else it won't change from that - is that correct? So wouldn't set_disable_af be a more accurate name for this operation, or am I misunderstanding something? The name doesn't matter to me here so much, I just want to be sure I'm good on how this works.

I was looking here: http://chdk.wikia.com/wiki/Script_commands

"You can use it like this: halfpress (so autofocus is set), then call aflock(1), the focus is now FIXED, meaning another halfpress will NOT refocus (the AF lamp doesnt turn on even). When you dont need the fixed focus anymore, call set_aflock(0)."


Thanks,

Esmail
« Last Edit: 31 / October / 2011, 18:15:22 by esmail »


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: set_focus command not working on SX130 1.01c
« Reply #4 on: 31 / October / 2011, 18:34:24 »
As you've noted, set_aflock doesn't lock the focus.
It locks/unlocks the autofocus (AF) mechanism so the camera stops trying to refocus and allowing manual focus settings.

The function names were set a long time ago (in a galaxy far far away...) and aren't likely to change.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: set_focus command not working on SX130 1.01c
« Reply #5 on: 31 / October / 2011, 18:51:58 »
As you've noted, set_aflock doesn't lock the focus.
It locks/unlocks the autofocus (AF) mechanism so the camera stops trying to refocus and allowing manual focus settings.

The function names were set a long time ago (in a galaxy far far away...)


 :)

Quote
and aren't likely to change.

Phil.

No, I understand and wouldn't expect the names to change, just wanted to nail down the semantics, especially since the description

"You can use it like this: halfpress (so autofocus is set), then call aflock(1), the focus is now FIXED, .."

seems to imply focus first, then lock.

Thanks for clarifying this.

Esmail

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal