--[[ @title Zoomy v01b TL+Zoom @chdk_version 1.4.1 @param z Zoom Incr +/- @default z 1 @param psb #Shots @ Start/End @default psb 1 @param psm #Shots @ Mid-Zoom @default psm 1 @param psz #Shots Per Zoom Step @default psz 1 ]] -- Enable script start: false -- Press Shutter to start/stop script -- Set Program mode with small center focus point to avoid AF wandering. -- Start Logfile print_screen(true) -- Get the system's current date and time currentDate = os.date() print("ZOOMY v01b Shot Log:",currentDate) print("Log: \\CHDK\\LOGS\\LOG_####.TXT") print("Zoom Step Unit:",z) print("#Shots Per Step:",psz) print("#Shots Start/End:",psb) print("#Shots Mid-Zoom:",psm) -- switch to shooting node if ( get_mode() == false ) then print("switching to shooting mode") set_record(1) while ( get_mode() == false ) do sleep(200) end end set_zoom_speed(10) zmax=get_zoom_steps() print("Max Zoom Steps:",zmax ) zmax=zmax-1 direction=1 wl=0 -- Set Exposure for series press("shoot_half") repeat sleep(50) until get_shooting() == true sv = get_sv96() rsv = sv96_to_iso(sv) av = get_av96() tv = get_tv96() ev = av + tv print("Setting Tv:",tv) print("Ev, Av:",ev,av) -- print("ISO:",sv96_real_to_market(rsv)) -- print("Apeture: f",av96_to_aperture(av)) -- set TV set_tv96(ev-av) -- #################### -- Make the exposure(s) -- #################### -- Loop #Exposures @ Begin step psbloop=0 -- Set focus press("shoot_half") repeat sleep(50) until get_shooting() == true while (psbloop < psb) do psbloop = psbloop + 1 print("Begin Shot#",psbloop,"of",psb ) exp = get_exp_count() shoot() while (get_exp_count() == exp) do sleep(50) end end -- Do the Zoomy Exposures repeat print("Zoom Step:",get_zoom(),"of",zmax ) -- Set focus press("shoot_half") repeat sleep(50) until get_shooting() == true -- Loop #Exposures per zoom step pszloop=0 while (pszloop < psz) do pszloop = pszloop + 1 print("Zoom Step Shot#",pszloop,"of",psz ) exp = get_exp_count() shoot() while (get_exp_count() == exp) do sleep(50) end end if ( direction > 0 ) then znext=get_zoom()+z else znext=get_zoom()-z end if (znext < 0 ) then print("Zoom Minimum Reached") -- Loop #Exposures @ End step psbloop=0 -- Set focus press("shoot_half") repeat sleep(50) until get_shooting() == true while (psbloop < psb) do psbloop = psbloop + 1 print("Ending Shot#",psbloop,"of",psb ) exp = get_exp_count() shoot() while (get_exp_count() == exp) do sleep(50) end end -- Stop Logfile -- Get the system's current date and time currentDate = os.date() print("Session End:",currentDate) print_screen(false) return end if (znext > zmax) then print("Zoom Maximum Reached") znext=zmax direction=0 psmloop=0 -- Loop psm # of shots in max zoom while (psmloop < psm) do psmloop = psmloop + 1 print("Zoom Max Shot#",psmloop,"of",psm ) exp = get_exp_count() shoot() while (get_exp_count() == exp) do sleep(50) end end print("Zoom Switching direction") end set_zoom(znext) i=1 while (get_zoom() ~= znext) do i = i + 1 if (zmax >= znext + i) then set_zoom(znext+i) else if (znext - i >= 0 ) then set_zoom(znext-i) else break end end set_zoom(znext) end until is_pressed("video")