Can't adjust zoom after set_zoom() - LUA Scripting - CHDK Forum supplierdeeply

Can't adjust zoom after set_zoom()

  • 4 Replies
  • 5163 Views
Can't adjust zoom after set_zoom()
« on: 20 / August / 2012, 18:44:39 »
Advertisements
Hi

--[[
@title Set zoom
--]]
print(get_zoom())
set_zoom(19)
sleep(1000)
print(get_zoom())

This simple script shows "0", then sets zoom to 19, and then prints this 19. Runs fine. But after running this script, the camera's zoom keys don't work anymore. I can go in/out the ALT menu, take shots, everything works, but changing zoom in any direction  is not possible.

Model: Canon SX150 IS
CHDK: 1.1.0-2079

Any ideas?
Thanks.

Re: Can't adjust zoom after set_zoom()
« Reply #1 on: 20 / August / 2012, 18:45:18 »
I forgot to mention that turning off & on the camera fixes the problem fortunately.

Re: Can't adjust zoom after set_zoom()
« Reply #2 on: 20 / August / 2012, 19:56:12 »
I know it doesn't help you much,  but some cameras have problems with the set_zoom() command.  Here's a forum thread on the topic : http://chdk.setepontos.com/index.php?topic=7071.0

Might be unrelated to this problem though.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Can't adjust zoom after set_zoom()
« Reply #3 on: 21 / August / 2012, 16:31:58 »
Hi Waterwingz.

Fortunately my camera does not shut down.

But I found good ideas in the script you linked, thanks. So I finished my script, even if it kills zoom. My script is for setting zoom by left/right/up/down in +-10 and +-1 steps (I need this for my DIY-bookscanner, to set previous zoom position easily if camera turns off).

Another guy in another thread has EXACTLY the same problem like me, different camera:

http://chdk.setepontos.com/index.php?topic=8323.0

Ferenc


*

Offline nafraf

  • *****
  • 1308
Re: Can't adjust zoom after set_zoom()
« Reply #4 on: 03 / April / 2013, 10:39:06 »
I detected the same bug in A495 100f, it is solved if CAM_USE_ALT_SET_ZOOM_POINT and CAM_USE_ALT_PT_MoveOpticalZoomAt,
but a495 uses propset3, then it is necessary to add the following line to propset3.h
Code: [Select]
#define PROPCASE_DIGITAL_ZOOM_MODE          91     // Digital Zoom Mode/State 0 = off/standard, 2 = 1.4x/1.5x, 3 = 2.3x/2.0x
Waterwingz tried to test this property sometime ago (posted here),  but his camera seems to have additional problems with zoom.
Could anyone with propset3 camera check prop 91 (DIGITAL_ZOOM_MODE) in his camera?
Thanks

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal