lens_set_zoom_point problem - General Discussion and Assistance - CHDK Forum

lens_set_zoom_point problem

  • 2 Replies
lens_set_zoom_point problem
« on: 01 / November / 2009, 06:42:26 »
Hello (Microfunguy),

in the main.c's while(1) area I use following code to move zoom to 55 mm (step 3) after half-pressing the shutter in PLAY-MODE to quick zoom to typical focal-length for stereo photos.

currMode = mode_get() & MODE_MASK;

if (currMode == MODE_REC)
  if (lensIsZoomed == 0)
    lensIsZoomed = 1;      
  lensIsZoomed = 0;

Similar code I use also on switching the camera on.
This works fine. But I have one problem with this.
From this 55 mm (zoom step 3) I can only further zoom in, e.g. to 65 mm, 77 mm and so on.
But I cannot zoom out to 46, 37, 27!?!

Only if I zoom one (ore more) step in (e.g. to 65, 77...), I can zoom out back to 55 and then to 46, 37 and 27.

So always If I make my lens zoom automatically to 55 (on switching on the cam and pressing shutter button half in PLAY Mode) I have to zoom in to make zooming out possible.

I guess there is somewhere a default zoom position stored in SDM, or SDM starts normally always with zoom step 1 (wide angle) and uses this also if switching from MODE_PLAY back to MODE_REC.
So I think I have to set this variable somewhere also to step 3 somehow, correct me if I am wrong!

Can you help me to solve my problem? Can you tell me, where zoom is initialized in SDM?

Thanks for help!

Best regards!
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: lens_set_zoom_point problem
« Reply #1 on: 01 / November / 2009, 19:34:19 »
Zoom is not initialised anywhere in SDM, although the problem is vaguely familiar.
I cannot remember under what circumstances I have seen it.
I assume that you have SDM synchronised zoom turned off ?

You could try adding your code to the CHDK build and seeing if the same problem persists.

If it does not, I can investigate it.

Re: lens_set_zoom_point problem
« Reply #2 on: 02 / November / 2009, 15:43:59 »
Hi Microfunguy,

I tested now with the CHDK build (trunk r825).
I tested only the code within the while(1) loop of main.c.
(This is the code which zooms to 55 mm if you are in PLAY mode and hit the shutter button to get into REC mode)
The zoom works fine it goes to 55 mm and zooming out (to 46, 37 ans 27) is also possible!

That means the problem only exists in SDM but not in CHDK build!

Hope that helps!

bes regards!
2 x IXUS 860IS 100c
2 x Powershot S110 103a


Related Topics