zoom during exposure on sx100 IS - page 5 - Script Writing - CHDK Forum

zoom during exposure on sx100 IS

  • 65 Replies
  • 33031 Views
Re: zoom during exposure on sx100 IS
« Reply #40 on: 04 / November / 2008, 02:03:41 »
Advertisements
i intend to make some adjustements to this script but where can i find the lua commands syntax?
or a guide to lua scripting or canon commands?
Powershot SX 100 IS

*

Offline reyalp

  • ******
  • 14126
Re: zoom during exposure on sx100 IS
« Reply #41 on: 04 / November / 2008, 03:04:25 »
i intend to make some adjustements to this script but where can i find the lua commands syntax?
or a guide to lua scripting or canon commands?
The documentation for the lua language can be found on the lua site: Lua: documentation
The documentation for the CHDK interface to lua is a bit scattered at the moment.
You can start here: LUA - CHDK Wiki

Basically, there's a function for all of the ubasic script commands. Unfortunately, the ubasic documentation is a bit scattered too, because different commands were introduced in different branches, and they haven't all been merged together yet.
The following links should cover most of it:
UBASIC/TutorialScratchpad - CHDK Wiki
CHDK/MoreBest - CHDK Wiki
Don't forget what the H stands for.

Re: zoom during exposure on sx100 IS
« Reply #42 on: 04 / November / 2008, 05:09:13 »
thanks reyalp.

i want to zoom out again after the shoting.
it should be ok if i add this two lines at the end of the script?

set_zoom(0)
sleep(5000)
Powershot SX 100 IS

Re: zoom during exposure on sx100 IS
« Reply #43 on: 04 / November / 2008, 09:47:55 »
nope .. it didnt help ... i also tried the same 2 lines before releasing the buttoms. no effect.
Powershot SX 100 IS

Re: zoom during exposure on sx100 IS
« Reply #44 on: 04 / November / 2008, 11:03:02 »
i modified the script to keep the shuter open as long as esposure is set, then to zoom out to initial.i manage to get result for the second part. seems like i miss something to get the tv value and keep the shuter open. i think is the get_tv command. any advice is wellcome:


max_zoom = get_zoom_steps() - 1
 
if get_zoom() ~= 0 then
  sleep(500)
  set_zoom(0)
  sleep(500)
end
 
get_tv = t
press("shoot_half")
repeat
  sleep(1)
until get_shooting() == true
press("shoot_full")
sleep(100)
set_zoom(max_zoom)

repeat
sleep(1)
t = t-1
until t = 0
 
release("shoot_full")

  sleep(500)
  set_zoom(0)
  sleep(500)

Powershot SX 100 IS

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: zoom during exposure on sx100 IS
« Reply #45 on: 04 / November / 2008, 12:36:23 »
Well... get_tv doesn't return seconds (it returns something else and it may be different for different cameras... tv96 is probably equal for all cameras, its in apex96(?) units) and sleep sleeps in milliseconds except that it's always in 10 ms minimum and 10 ms increments.

Re: zoom during exposure on sx100 IS
« Reply #46 on: 05 / November / 2008, 01:51:13 »
thanks fudgey. anyone can give me some guiding lines how to read the exposure and transform to seconds?
Powershot SX 100 IS

Re: zoom during exposure on sx100 IS
« Reply #47 on: 10 / November / 2008, 04:40:22 »
i tried to change the script for starting with maximum zoom and then zoom out during exposure.  the problem is that camera loks after zooming in. i tried also with set_zoom_speed and same result. any ideas?

max_zoom = get_zoom_steps() - 1
 
if get_zoom() ~= max_zoom then
  set_zoom(max_zoom)
  sleep(500)
end
 
press("shoot_half")
repeat
  sleep(1)
until get_shooting() == true
press("shoot_full")
sleep(100)
set_zoom(0)
 
repeat
  sleep(1)
until get_shooting() ~= true
 
release("shoot_full")
release("shoot_half")
Powershot SX 100 IS

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: zoom during exposure on sx100 IS
« Reply #48 on: 10 / November / 2008, 04:53:06 »
what do you mean, it locks after zooming?

Re: zoom during exposure on sx100 IS
« Reply #49 on: 10 / November / 2008, 05:30:27 »
i mean after zooming-in the camera shuts off, the lens remains unretracted. i need to press the on/off button.
Powershot SX 100 IS

 

Related Topics


SimplePortal © 2008-2014, SimplePortal