Optical and digital zoom on Canon SX40HS - Script Writing - CHDK Forum

Optical and digital zoom on Canon SX40HS

  • 1 Replies
Optical and digital zoom on Canon SX40HS
« on: 21 / June / 2012, 08:51:04 »
I have Canon SX40HS. I need to handle optical and digital zoom from scripts. I have several questions.

So, I can set optical zoom with set_zoom() command. It's almost fine. But sometimes I get the "Lens error" message on camera's screen and camera shuts down. What is the matter?

I have not found special command for digital zoom handling. I tried the following options.

Managing zoom with click("zoom_in") and click("zoom_out"). When optical zoom is in maximum value, these command begin to change digital zoom. But these commands are not very convenient such as set_zoom(), zoom changes with jumps, not smoothly. press("zoom_in") does not work.

Another problem is after using set_zoom() command click("zoom_in") and click("zoom_out") do not work anymore. Does anybody know why?

Then I tried to use Property Cases. I found out that Property Case #255 relates to optical zoom value (from 0 to 200). When digital zoom changes, prop case #95 changes from 0 to 6, #92 changes from 4000 to 1000, value of prop case #253 is always equal to #95. I've tried set this property cases by set_prop(), but it does not work. Values change, but zoom doesn't. If, for example, #95 = 3, I set it to 5, and then try click("zoom_in"), digital zoom changes, but its value is 4, not 6.
Code: [Select]
con 8> =return get_prop(95)
con 9> =set_prop(95, 5)
con 10> =return get_prop(95)
con 11> =click("zoom_in")
con 12> =return get_prop(95)

Can I rule digital zoom effectively?

Re: Optical and digital zoom on Canon SX40HS
« Reply #1 on: 19 / July / 2012, 18:46:44 »
Do you need to give the camera more time?  Instead of

click ("zoom_in")

you might need:


to give the camera a fraction of a second to drive the optics or simulate same.

I may have some syntax wrong here; I've written a few minor uBASIC scripts, but haven't started on Lua yet.
S3 IS with LensMate filter/hood adapter


Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal