Canon Camera Hackers Manual page 161

Camera hackers manual berthold daum
Table of Contents

Advertisement

152
C H A P T E R 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)
click("display")
sleep(100)
end
end
function sleep_until(time)
repeat
local sleep_time =
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.
~= mode do
time - get_tick_count()

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents