set_zoom problems in uBASIC & Lua scripts - page 4 - General Discussion and Assistance - CHDK Forum supplierdeeply

set_zoom problems in uBASIC & Lua scripts

  • 91 Replies
  • 46833 Views
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #30 on: 12 / November / 2011, 15:46:17 »
Advertisements
Replace second msleep() with while (zoom_busy) msleep(10);
Went one better :
Code: [Select]
_DoAFLock();
msleep(100);
    _MoveZoomLensWithPoint((short*)&newpt);
do { msleep(100) ; } while (zoom_busy);
_UnlockAF();
do { msleep(100) ; } while (focus_busy);
Still hangs up after a couple of zoom steps.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: set_zoom problems in uBASIC & Lua scripts - conclusion for now
« Reply #31 on: 15 / November / 2011, 21:26:33 »
keywords :  set_zoom script uBasic  Lua MoveZoomLensWithPoint continuous focus

I received independent confirmation today that this bug affects other cameras (SD980 &SD780) as well as my G10 and SD940.  Maybe I will come back and dig into the Canon code later but for now,  here are the possible work arounds :

1) If you can set your camera to Single focus rather than Continuous focus, the problem does not occur.

2) You can try bracketing calls to set_zoom() in your script with set_aflock(1) and set_aflock(0) .  However, this probably only works if your camera supports single focus mode in the first place.

3) If all else fails,  set your zoom position in your script using click "KEY_ZOOM_OUT" and click "KEY_ZOOM_IN" rather than set_zoom().

Like the man said,  the H stands for Hack.

« Last Edit: 16 / November / 2011, 20:55:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #32 on: 18 / November / 2011, 14:56:59 »
Will test asap,

Q:
1) what is latest Script to test with
2) which build do I need to test with?

NOTE:At the moment using CHDK-DE because of 2x faster shutter times with that CHDK

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #33 on: 18 / November / 2011, 17:59:30 »
Will test asap,
Thanks, but I think I can save you the trouble.  I've now had confirmation from other users that the SD780 and SD980 exhibit the same symptoms.  So unless you are curious to see what happens,  you don't need to test this for me.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #34 on: 19 / November / 2011, 16:14:08 »
I already tested it before I've read your message. Indeed it crashes my cam also, even when using CHDK_DE. BTW The shutterspeedfix is the reason I use that version at the moment, but from here http://chdk.setepontos.com/index.php?topic=1444.15 I see that is already in trunk  :D :D

Any more test needed then I will perform them, that is if I'm in time to read this forum thread before it is fixed  :-[
« Last Edit: 19 / November / 2011, 17:26:22 by openuas »

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #35 on: 19 / November / 2011, 16:20:11 »
I already tested it before I've read your message. But indeed it crashes my cam also, even when using CHDK_DE. BTW The shutterspeedfix is the reason I use that version at the moment, maybe it is already integrated in main CHDK.
Thanks for taking a look. 

If I get a moment,  I'll see if I can figure out what the "shutterspeedfix" involves.

Update :   shutterspeedfix is the change to allow a shoot_full_only() command (that skips the shoot_half() step 0 to allow fast shooting where the camera is already focused.  It's been in the autobuild for a while now.
« Last Edit: 19 / November / 2011, 17:39:35 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #36 on: 19 / November / 2011, 17:30:12 »
Thx waterwingz , here http://chdk.setepontos.com/index.php?topic=1444.15 I see that is already in trunk :D for CHDK_DE it was massive speed improvement. Will test latest build of today see if it is indeed faster, but move finding to other thread as not to pollute this one.


*

Offline reyalp

  • ******
  • 14110
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #37 on: 19 / November / 2011, 20:17:57 »
FWIW, the script seems to work fine on d10 and a540
Don't forget what the H stands for.


Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #38 on: 19 / November / 2011, 20:20:41 »
FWIW, the script seems to work fine on d10 and a540
Curious.  The a540 is quite old but the D10 came out after my G10 but before my SD940.  It works and mine don't.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14110
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #39 on: 19 / November / 2011, 23:07:30 »
FWIW, the script seems to work fine on d10 and a540
Curious.  The a540 is quite old but the D10 came out after my G10 but before my SD940.  It works and mine don't.

The sd940 and G10 romlogs are different enough that I wouldn't be surprised if they are two unrelated problems.

Some of this we talked about in IRC, but I'll put it here for posterity.

sd940 103c
Assert is triggered by the return value of sub_FF87C778 (KerFlag.c) called from FF8B2B74 ( ExpDrv.c Line 3499) It's curious that this is in expdrv, which I wouldn't expect to be directly related to focus or zoom. Maybe AE... I guess KerFlag is "kernel flag" but I don't have much idea what any of this is doing. We do hook expdrv for "extra long exposure" support, but waterwingz tried disabling the hook and there was no change.

G10 102a
Phil covered most of this.
One thing I can add is sub_FFAD17B8 is MoveFocusLensToDistance (MoveFocusDistance refers to the same address). shooting_set_zoom calls this via shooting_set_focus -> lens_set_focus_pos. So the zoom is probably working, it's attempting to re-focus afterward that's the problem.

g12 has a hack in lens_set_focus_pos for continuous af mode.

Following is basically duplicated form Phils post.
--
ASSERT!! FocusLensController.c Line 650 in PhySw (aka kbd_task)
this is triggered by return value of the call to sub_FF938AF8 at FF939368

sub_FF938AF8 is a quite simple function that compares it's argument to  *(0x8C3C + 4)

It looks to me like the argument is *(0xF5E8+0xC)
--

Watching these values while zooming manually might be instructive.

Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal