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

set_zoom problems in uBASIC & Lua scripts

  • 62 Replies
  • 13191 Views
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #10 on: 10 / November / 2011, 20:47:43 »
Advertisements
Tried the S95 fix.  G10 and SD940 still shutdown after a few manual zoom steps via the script.

Tried the G12 fix.  Same problem.

Commenting out _MoveZoomLensWithPoint((short*)&newpt); in wrappers.c stops the crash - but of coarse the zoom does not move either.

« Last Edit: 10 / November / 2011, 21:10:04 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3107
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #11 on: 10 / November / 2011, 21:41:50 »
Tried the S95 fix.  G10 and SD940 still shutdown after a few manual zoom steps via the script.

Tried the G12 fix.  Same problem.

Commenting out _MoveZoomLensWithPoint((short*)&newpt); in wrappers.c stops the crash - but of coarse the zoom does not move either.



Try finding the _PT_MoveOpticalZoomAt function and using the SX30 version.

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)

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #12 on: 10 / November / 2011, 22:42:28 »
Try finding the _PT_MoveOpticalZoomAt function and using the SX30 version.
Assuming that #define PROPCASE_DIGITAL_ZOOM_MODE  91 is right for propset2 & propset3, then using the SX30 code causes the camera to reset right after the first attempt to set the zoom position.  The other way I sometime got 6 or 7 zoom steps before a shudown.

Again,  commenting out the call to PT_MoveOpticalZoomAt lets the script run,  so I'm pretty sure I got the patch right.


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3107
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #13 on: 10 / November / 2011, 22:48:38 »
Try finding the _PT_MoveOpticalZoomAt function and using the SX30 version.
Assuming that #define PROPCASE_DIGITAL_ZOOM_MODE  91 is right for propset2 & propset3, then using the SX30 code causes the camera to reset right after the first attempt to set the zoom position.  The other way I sometime got 6 or 7 zoom steps before a shudown.

Again,  commenting out the call to PT_MoveOpticalZoomAt lets the script run,  so I'm pretty sure I got the patch right.



It was worth a try :(

Can you generate a ROMLOG after the crash when using _MoveZoomLensWithPoint.
Then we can see where it is crashing and maybe track down why.

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)


Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #14 on: 10 / November / 2011, 23:12:01 »
Can you generate a ROMLOG after the crash when using _MoveZoomLensWithPoint.
Then we can see where it is crashing and maybe track down why.
Okay - both versions from my G10.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3107
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #15 on: 10 / November / 2011, 23:16:00 »
Can you generate a ROMLOG after the crash when using _MoveZoomLensWithPoint.
Then we can see where it is crashing and maybe track down why.
Okay - both versions from my G10.

Need to know which firmware version and also need the main.dump file from the core directory for each build.

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)

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #16 on: 10 / November / 2011, 23:20:56 »
Need to know which firmware version and also need the main.dump file from the core directory for each build.
G10 1.02a

working on the main.dump - got the one for MoveZoomLensWithPoint

http://www.box.net/shared/2yc1ovmes6lb6na335eo

Lost the wrappers.c file for the other build.  I guess I can reconstruct if this one is not sufficient ?


« Last Edit: 10 / November / 2011, 23:37:27 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3107
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #17 on: 11 / November / 2011, 02:26:24 »
Need to know which firmware version and also need the main.dump file from the core directory for each build.
G10 1.02a

working on the main.dump - got the one for MoveZoomLensWithPoint

http://www.box.net/shared/2yc1ovmes6lb6na335eo

Lost the wrappers.c file for the other build.  I guess I can reconstruct if this one is not sufficient ?


It's the same error in both logs so that should be enough info.

One thought occured to me - is the crash affected by the focus distance set before you start to zoom? If you pre-focus to infinity before running the script does it alter things?

Edit: looks like it's in the focus code, not the zoom code in the firmware. Do you have Servo AF or Continuous AF turned on? Does changing these have any effect?

Phil.
« Last Edit: 11 / November / 2011, 03:29:17 by philmoz »
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)


Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #18 on: 11 / November / 2011, 09:23:42 »
One thought occured to me - is the crash affected by the focus distance set before you start to zoom? If you pre-focus to infinity before running the script does it alter things?
No effect - still crashes after a few zoom movements.

Quote
Edit: looks like it's in the focus code, not the zoom code in the firmware. Do you have Servo AF or Continuous AF turned on? Does changing these have any effect?
I noticed the "ASSERT!! FocusLensController.c Line 650" at the start of both ROM LOG's too.

I played with the G10 focus options ( there are five menu items so many permutations ).  So far I can confirm that setting Continuous AF to Single results in no crashing.   So if the camera does not refocus then poking in zoom commands from a script does not cause crashes.  Servo AF does not seem to be related to crashes.   

This matches what I see on the LCD screen - after each zoom step there is about a 1 second refocus activity.  At that point things either lock up and reset or go on as normal.

Only had a couple of minutes to look at the SD940 menus - not sure it has a "single" focus option but I'll look again when I have a few minutes.

« Last Edit: 11 / November / 2011, 09:27:51 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3107
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #19 on: 11 / November / 2011, 14:43:28 »

I played with the G10 focus options ( there are five menu items so many permutations ).  So far I can confirm that setting Continuous AF to Single results in no crashing.   So if the camera does not refocus then poking in zoom commands from a script does not cause crashes.  Servo AF does not seem to be related to crashes.   


Try adding:
       while (focus_busy) msleep(10);
before the call to _MoveZoomLensWithPoint

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)

 

Related Topics