EasyManua.ls Logo

Canon Camera - Page 161

Canon Camera
257 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
152 CHAPTER 5 Scripting
pcall(function()
require("chdklib")
schedules = "SCHED"
end
)
The functions set_display_mode() and sleep_until() are not really new.
They are simply copied from the Accurate Time Lapse script at the begin-
ning of section 5.7.1.
props = require "propcase"
function set_display_mode(mode)
while get_prop(props.DISPLAY_MODE)
~= mode do
click("display")
sleep(100)
end
end
function sleep_until(time)
repeat
local sleep_time =
time - get_tick_count()
if sleep_time <= 0 then
return false
end
wait_click(sleep_time)
if is_pressed("set") then
return true
end
until is_pressed("no_key")
end
Function focus(), however, does a bit more than its sibling in the Accurate
Time Lapse script. It performs the required focusing operations. In case of
immediate focusing (F), the shutter button is pressed halfway to perform
the focusing. The repeat loop waits until this process has completed. Then
the autofocus system is locked. A parameter value of A releases the lock
again. Other values are numeric and specify the subject distance. This is set
with set_focus() after locking the autofocus system.

Table of Contents

Related product manuals