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

Setting focus from scripts or menus

  • 601 Replies
  • 217138 Views
Advertisements
Hi,

Some of the tests are not going to work - that's expected.  Finding out which ones don't work is almost as important as finding out which ones do.

OK! Next Test.

With set_focus() test disabled: No crash


OK! Next Test. With set_focus() test disabled: No crash
Done - master table updated.  http://bit.ly/1a99LCe
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Started a shared spreadsheet for phase 2 results
Some notes.
Usually only one of the MFOn event procedures exists on a camera. When there's two (later Vx, early DryOS models), they are AFAIK equivalent.
The ixus65 and the ixus870 crash in the MFOn test.

Started a shared spreadsheet for phase 2 results
Some notes.
Usually only one of the MFOn event procedures exists on a camera. When there's two (later Vx, early DryOS models), they are AFAIK equivalent.
The ixus65 and the ixus870 crash in the MFOn test.
I was thinking that it might be better to indicate an additional state in the spreadsheet to differentiate between the call_event_proc returning -1  (unavailable)  and call_event_proc returning 1 (with set_focus = pass,fail,crash)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14128
I checked the disable interlocks patch into the trunk, changeset 3303, so after autobuild 3303, users can test without needing a special build.

As noted previously this may crash your camera.

I will probably remove this function before the 1.3 release, so scripts not aimed at debugging this specific problem should not use it. Once we have this sorted out, we may want a camera.h define for new ports that disables all interlocks.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
OK! Next Test. With set_focus() test disabled: No crash
Done - master table updated.  http://bit.ly/1a99LCe

Should the header for column G be PT_MFOn?

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 reyalp

  • ******
  • 14128
Here's results with the interlock disabled.

The elph130 is the most interesting:

As expected, crashes with set_focus only and PressSw1AndMF

SS.Create + SS.MFOn works, even though this camera does not have MF in the canon firmware. It also sets the focus_mode propcase to 1 (MF)

I verified that this is actually setting the focus distance on the lens. Furthermore, playing with  MoveFocusLensToDistance allows using this just like manual focus, i.e. you can set it outside of half shoot and shooting uses the value you set.

script set_focus does not do this, because cam_has_manual_focus is not set, but it could.

Finally, I tried continuous AF and Server AF with the modes that don't otherwise crash, and they appear to have worked.

edit:
Might help if I attach the file...
Don't forget what the H stands for.

Script update to 2.8.    Minor updates :   

1) Fixes incorrect status report of camera can't focus
2) Forcibly turns off CHDK menu override and SD override  (after I wasted several hours trying to discover why my script was crashing when interlock bypass was enabled.   :'(
« Last Edit: 06 / January / 2014, 09:17:35 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Should the header for column G be PT_MFOn?
Yup - good catch.  Fixed.



Here's results with the interlock disabled.  The elph130 is the most interesting:  As expected, crashes with set_focus only and PressSw1AndMF SS.Create + SS.MFOn works, even though this camera does not have MF in the canon firmware. It also sets the focus_mode propcase to 1 (MF)  I verified that this is actually setting the focus distance on the lens. Furthermore, playing with  MoveFocusLensToDistance allows using this just like manual focus, i.e. you can set it outside of half shoot and shooting uses the value you set.

script set_focus does not do this, because cam_has_manual_focus is not set, but it could.

Finally, I tried continuous AF and Server AF with the modes that don't otherwise crash, and they appear to have worked.
Identical results to the A1200 - which also does not have a Canon MF mode.   This just keeps getting better.
« Last Edit: 05 / January / 2014, 19:05:38 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Here are the results for my A4000.  I didn't realize the results kept being appended, and I redid many of the tests, so the output is a bit crowded, but I don't think it will hurt to leave it all in there.

The set_aflock and event_procs tests seemed to crash the camera (at least the viewscreen went black and it stopped working, although I could use the power button to reset it).  I did some runs with and without those tests disabled so that their partial results could be seen.

The A4000 seems to be difficult to set the focus on.  I finally got it to work last July as per the following message in the A4000 development thread: http://chdk.setepontos.com/index.php?topic=9443.msg102804#msg102804.  At least that was the case with CHDK as available last July.  I haven't tried it with a newer version since.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal