Some set_prop(6, 3) and infinity inconsistency - Script Writing - CHDK Forum supplierdeeply

Some set_prop(6, 3) and infinity inconsistency

  • 2 Replies
  • 2906 Views
*

Offline dvip

  • ****
  • 451
Some set_prop(6, 3) and infinity inconsistency
« on: 14 / July / 2013, 13:05:10 »
Advertisements
I have try this in lua and it always get different results.
I am trying to set the focus to infinity and lock it there,
but sometimes f returns 65535 and sometimes it returns something like 634 or less.

I have tried different combinations but it is always inconsistent.

  -- set_prop(6, 4) -- Manual focus
  print("Set to infinity")
  set_prop(6, 3) -- Infinity
  -- set_focus(65535) -- Infinity
  sleep(2000)
  set_aflock(1)
  sleep(1000)
  press("shoot_half")
  sleep(1000)
  press("shoot_full")
  sleep(1000)
  release("shoot_full")
  release("shoot_half")
  sleep(1000)
  set_aflock(0)

f = get_focus()
print("FL at:", f)
print("")
sleep(2000)


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Some set_prop(6, 3) and infinity inconsistency
« Reply #1 on: 14 / July / 2013, 15:01:30 »
Which camera? You have an A590, right?

set_prop(6,<x>) does not work. You can not set a focus mode with this propertycase. Use the MF mode and set the focus value, e.g. 65535.

With Lua you can turn on/off the MF mode with the following command:
Code: [Select]
post_levent_for_npt("PressSw1AndMF")msl
CHDK-DE:  CHDK-DE links

*

Offline dvip

  • ****
  • 451
Re: Some set_prop(6, 3) and infinity inconsistency
« Reply #2 on: 14 / July / 2013, 20:30:44 »
Which camera? You have an A590, right?

Yes

set_prop(6,<x>) does not work. You can not set a focus mode with this propertycase. Use the MF mode and set the focus value, e.g. 65535.

With Lua you can turn on/off the MF mode with the following command:
Code: [Select]
post_levent_for_npt("PressSw1AndMF")msl

set_prop(6, 3)  drove me nuts for a while because it works sometimes.

I will give levent_for_npt("PressSw1AndMF") and MF a try.
The only thing is that I usually have the A590is holding the
image on the screen after the picture is taken and it seems
like there is no way to get out of MF after the script ends.

Thanks for the information, msl.


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal