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

Setting focus from scripts or menus

  • 601 Replies
  • 190907 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Setting focus from scripts or menus
« Reply #320 on: 09 / March / 2014, 20:06:02 »
Advertisements
MoveFocusLensToDistance -> sub_FFADA0DC -> sub_FFADA06C -> sub_FF953C94 assert at FF953CC0 checking the value of *(0x60EC + 4)
Same assert here. The equivalent-looking ixus30 assert complains about 'FALSE' return value from "IsFocusLensHandle" (I mentioned this somewhere already).
I'm not familiar with the code, but fixing the set_focus script commands will not help with scriptless SD overrides (SD bracketing, SD override from menu, ...).

*

Offline dvip

  • ****
  • 451
Re: Setting focus from scripts or menus
« Reply #321 on: 09 / March / 2014, 20:27:49 »
The A590IS.

*

Offline reyalp

  • ******
  • 14080
Re: Setting focus from scripts or menus
« Reply #322 on: 09 / March / 2014, 20:31:01 »
Same assert here. The equivalent-looking ixus30 assert complains about 'FALSE' return value from "IsFocusLensHandle" (I mentioned this somewhere already).
A quick search for IsFocusLensHandle didn't find it, would be interested to see if you can find it.

Quote
I'm not familiar with the code, but fixing the set_focus script commands will not help with scriptless SD overrides (SD bracketing, SD override from menu, ...).
Right, my thought is it might help us figure out the required conditions. The attached patch (for lua only) should use set_now if the camera is in MF mode. This works on my elph130: focus updates immediately if I use set_mf(1), but it doesn't have the crash problem...

The set_focus script command really needs to be cleaned up anyway. The overrides also need some attention, because we need a way to get into MF or AF lock for the cameras that require it. The initial patch from waterwingz is just a starting point.

Bracketing may have it's own problems, since it has to happen in shooting, though not override hook, so maybe it's ok.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Setting focus from scripts or menus
« Reply #323 on: 09 / March / 2014, 20:57:02 »
Same assert here. The equivalent-looking ixus30 assert complains about 'FALSE' return value from "IsFocusLensHandle" (I mentioned this somewhere already).
A quick search for IsFocusLensHandle didn't find it, would be interested to see if you can find it.
Not sure what you mean, the explanatory message is only present in the firmware of ixus30/40 and s1is.
ffa60224:    ldr   r1, [pc, #24]   ; ffa60244: (ffa5ef28)  **"FocusLensController.c"
ffa60228:    ldr   r0, [pc, #28]   ; ffa6024c: (ffa5f030)  **"IsFocusLensHandle( hFocusLens )"


Quote
I'm not familiar with the code, but fixing the set_focus script commands will not help with scriptless SD overrides (SD bracketing, SD override from menu, ...).
Right, my thought is it might help us figure out the required conditions.
Of course, that was just a note, not complaint.


*

Offline reyalp

  • ******
  • 14080
Re: Setting focus from scripts or menus
« Reply #324 on: 09 / March / 2014, 22:30:38 »
Not sure what you mean, the explanatory message is only present in the firmware of ixus30/40 and s1is.
ffa60224:    ldr   r1, [pc, #24]   ; ffa60244: (ffa5ef28)  **"FocusLensController.c"
ffa60228:    ldr   r0, [pc, #28]   ; ffa6024c: (ffa5f030)  **"IsFocusLensHandle( hFocusLens )"

I meant the thread or post where you posted about this assert before.
Don't forget what the H stands for.

*

Offline nafraf

  • *****
  • 1308
Re: Setting focus from scripts or menus
« Reply #325 on: 10 / March / 2014, 05:43:54 »
a3400, r3376 from the autobuild
- doesn't crash when not actually shooting
- when shooting: crashes in the AF lock test _after_ the first shot
If sleep(1000) added after first shoot, A810 passes all tests.
« Last Edit: 10 / March / 2014, 05:47:01 by nafraf »

Re: Setting focus from scripts or menus
« Reply #326 on: 10 / March / 2014, 08:59:30 »
Right, my thought is it might help us figure out the required conditions.
The set_focus script command really needs to be cleaned up anyway.
If sleep(1000) added after first shoot, A810 passes all tests.
I guess all this comes down the timing of when we ask the Canon firmware to move the focus mechanism - both in terms of SET_NOW and in waits after a set_focus() is issued.   In the later case,  it would be nice if there were something the code could poll to know when the focus mechanism had completed the request.  Otherwise a hard coded delay in either the script or the command seems appropriate?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Setting focus from scripts or menus
« Reply #327 on: 10 / March / 2014, 15:27:29 »
a3400, r3376 from the autobuild
- doesn't crash when not actually shooting
- when shooting: crashes in the AF lock test _after_ the first shot
If sleep(1000) added after first shoot, A810 passes all tests.
To further complicate things: the test succeeds on the a3400 with this added sleep, but only if review is set to "Off". It was set to 2s previously, set_focus was attempted during image review (and that crashed). Can we detect "recreview" somehow?

Quote
A quick search for IsFocusLensHandle didn't find it, would be interested to see if you can find it.
Cool. I can't find it either, so it didn't happen...
I meant the thread or post where you posted about this assert before.
The post that made me investigate is the one before this.


*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: Setting focus from scripts or menus
« Reply #328 on: 11 / March / 2014, 04:23:47 »
Test from SX260. All looks fine.

*

Offline reyalp

  • ******
  • 14080
Re: Setting focus from scripts or menus
« Reply #329 on: 12 / March / 2014, 00:54:30 »
I guess all this comes down the timing of when we ask the Canon firmware to move the focus mechanism - both in terms of SET_NOW and in waits after a set_focus() is issued.   In the later case,  it would be nice if there were something the code could poll to know when the focus mechanism had completed the request.  Otherwise a hard coded delay in either the script or the command seems appropriate?
It would be good to get a clearer understanding of exactly when/where this crash happens.

I was originally confused thinking it was the manual test after the AF test (hence my probably confusing comments earlier...), but I assume it's the set_focus in the second shot that fails?

If the shot waits for get_shooting() to go false, does it avoid the crash?

There are already a bunch of 1 second sleeps in the script.

We already knew that trying to set focus while in pre-shoot crashed on these cameras, so I guess we ought to try to avoid that. We could fail set_focus when in pre-shoot, but on many cameras this is OK. Do we need another define?
Don't forget what the H stands for.

 

Related Topics