Setting focus from scripts or menus - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Setting focus from scripts or menus

  • 556 Replies
  • 82042 Views
*

Offline reyalp

  • ******
  • 11791
Advertisements
Some further thoughts:

The defines will have a big effect on the results, and are almost certainly wrong for many cameras.

We need to clarify which defines need to be set for cameras with particular characteristics. The reason elph130 crashed is that I assumed CAM_CAN_SD_OVER_NOT_IN_MF applied, since the camera does not have MF at all but it ends up making the camera try to sd override when not in AF_LOCK.

Once we get this somewhat sorted out, the script should be added to http://chdk.wikia.com/wiki/Testing with information about which combinations of defines should be tested for a new port.

shooting_can_focus desperately needs to be cleaned up.

set_focus could return whether or not it is able to set focus in the current settings. For cameras that require af_lock, it might also be possible to set it when needed.

Setting the AF_LOCK propcase for when using set_aflock seems like a good idea. There is some risk it could have unexpected side effects, but the whole thing is currently so unreliable I'm not convinced that matters.

Currently, in MF mode overrides are applied with SET_NOW when set_focus is called. This would also probably work when AF_LOCK is engaged. This might be useful because you can see the effect immediately.

There's a bunch of stuff in shooting_can_focus related to movie mode. I have not investigated this, if anyone knows the history please post.
Don't forget what the H stands for.

Glad to help, wish I owned more camera's I could test. I have three but all three are IXUS 240 HS  ::)
I just updated the script to allow individual tests to be enabled/disabled.   When you get a minute, please download the new version from the first post in this thread and try that with the set_aflock() test disabled?

Retesting of other cameras with results posted here is not necessary at this point.

TIA

WW
Ported :   A1200    SD940   G10    Powershot N    G16

Retesting of other cameras with results posted here is not necessary at this point.

Actually,  I retract this sentence.   The new version of the script now allows the use of a Lua native call method for entering MF mode :
Code: [Select]
        call_event_proc("SS.Create")
        call_event_proc("SS.MFOn")
The sx50hs will not allow you to set_focus() (i.e. enter MF mode) any other way. When I test this by remove the #defines interlocks so that it tries to use set_focus() regardless of its current mode,  it crashes with all the other methods.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline nafraf

  • *****
  • 1305
Results for sx510hs


*

Offline zeno

  • *****
  • 884
Here's the result of testing my S100
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline zeno

  • *****
  • 884
And my A570
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline JvdP

  • ***
  • 174
I just updated the script to allow individual tests to be enabled/disabled.   When you get a minute, please download the new version from the first post in this thread and try that with the set_aflock() test disabled?

Retesting of other cameras with results posted here is not necessary at this point.

TIA

WW
That did the trick. Here are the results.


*

Offline srsa_4c

  • ******
  • 3832
I'm getting inconclusive results. Shooting a bright window made most tests fail on these two cameras. Appended csv's attached.


I'm getting inconclusive results. Shooting a bright window made most tests fail on these two cameras. Appended csv's attached.
Thanks for this. 

I took a look at the csv's and might need to adjust the script timing a bit.  In the first three tests, for both of your cameras,  it looks like there is a response to the set_focus() command .   The focus moves each time towards the new requested setting. It's just not reporting an accurate conclusion to the movement.   The fourth test situation clearly does not work for the SX100 though.

The first SX100 test starts with the camera focused at infinity.  When the plain set_focus() command is issued next, is it possible the shoot() happens before the focus controller can pull the focus back to 100 mm? After that,  it seems to get back on track.

With the ixus110_sd960, the failed tests are failing because the reported focus is more than 10% different than the requested focus.  But the focus does appear to be moving in response to the set_focus() commands.  I wonder if this is also a timing issue, a mechanical problem, or the accuracy limit of the ixus110 ?

I think my initial conclusion is that the first three tests "work" for both of your cameras and the last test does not.  The timing might need adjustment or I need to widen the acceptable "accuracy".

WW
 
« Last Edit: 31 / December / 2013, 10:23:38 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Here's the result of testing my S100
dave :  can you please download the newest script version from the first post in this thread, enable the new fouth test and Lua Native calls and see if the SS.MFOn test works for your S100?

TIA
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics