Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife) - Completed and Working Scripts - CHDK Forum supplierdeeply

Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)

  • 5 Replies
  • 8717 Views
Advertisements
Hi All,
I would like to share with you some LUA scripts (Sardinian_Knife) that I use with my SX40HS and SX150IS.

I attach the zip file containing a short readme, and the following script:
  - Focus bracketing
  - EV bracketing
  - Intervalometer
  - Motion detection
 
I hope you find them useful.  :)
    Giovanni
"According to the laws of aerodynamics, the bumblebee can't fly either,
but the bumblebee doesn't know anything about the laws of aerodynamics, so it goes ahead and flies anyway." (Igor Sikorsky)

Re: Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)
« Reply #1 on: 29 / January / 2013, 10:14:00 »
I took a quick look and I must say these are very nicely organized, commented and formatted.  Thanks for sharing with us - this is a great example that others could learn from and emulate.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)
« Reply #2 on: 29 / January / 2013, 15:42:04 »
I have read the xlib and it seems to be usefull. For me it could be added to the CHDK standard lua libraries (provided with autobuild. The only note - naming convention in CHDK scripting is rather wait_after_shoot than Java/C-flavour waitAfterShoot.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)
« Reply #3 on: 29 / January / 2013, 16:36:00 »
It would be great for me to contribute to CHDK standard lua libraries.  :D
Of course I'm willing to change the naming in order to match Java/C-flavour convention or other CHDK rules.
"According to the laws of aerodynamics, the bumblebee can't fly either,
but the bumblebee doesn't know anything about the laws of aerodynamics, so it goes ahead and flies anyway." (Igor Sikorsky)


Re: Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)
« Reply #4 on: 01 / March / 2013, 23:37:37 »
I was trying to figure out how to make it honor manual focus mode.

I don't really know how to do it but I tried moving the set_aflock(1) statement before press("shoot_half") statement but no dice  :(

Code: [Select]
function main_shot()
local out_string = ""
press("shoot_half")
xlib.WaitBeforeShoot()
set_aflock(1)

Obviously, this was an attempted hack which failed.

Re: Set of scripts for EV and DoF bracketing, and more (Sardinian_Knife)
« Reply #5 on: 26 / March / 2013, 10:42:27 »
I have not had the opportunity to use the manual focus function. But I think that with devices with DIGIC 4 or 5 you have to save the focus mode, set the focus manually, set the focus and revert back to the previously saved.

As an example:

   rc = get_prop(props.REAL_FOCUS_MODE)  -- get focus status
   set_prop(props.REAL_FOCUS_MODE,4)      -- sets manual focus
   set_focus(1000)                                        -- set focus at 1 meter (value is expressed in millimeters)
   set_aflock(1)                                              -- lock the focus distance
   sleep(500)                                                 -- sleep half a second
   shoot()                                                       -- shoot
   set_aflock(0)                                              -- release the focus lock
   set_prop(props.REAL_FOCUS_MODE,rc)      -- restore focus mode


Otherwise you can try to set the focus distance not through the function call,
but pausing the procedure, then using the manual controls of focus to set the correct focus,
and then resume execution of the procedure blocking the value of focus setting.

I do not know if it works, I've never tried. Try it, then tell me ....  ::)

This could be an example:
   rc = get_prop(props.REAL_FOCUS_MODE)     -- get focus status
   set_prop(props.REAL_FOCUS_MODE,4)         -- sets manual focus

   print("You are in manual focus")                   -- print msg
   print("Set the focus
   print("Press SET to resume")
   print("script execution")
                                                                          -- loop until the SET key is pressed
      while true do                                      -- during this time you can set the manual focus
         wait_click(5000)                         -- using camera
            if is_pressed("set") then
               break
            end
      end
                                                                          -- resume the execution of script
   set_aflock(1)                              -- lock the focus distance
   sleep(500)                              -- sleep half a second
   shoot()                                 -- shoot
   set_aflock(0)                              -- release the focus lock
   set_prop(props.REAL_FOCUS_MODE,rc)       -- restore focus mode
"According to the laws of aerodynamics, the bumblebee can't fly either,
but the bumblebee doesn't know anything about the laws of aerodynamics, so it goes ahead and flies anyway." (Igor Sikorsky)

 

Related Topics