Canon Camera Hackers Manual page 194

Camera hackers manual berthold daum
Table of Contents

Advertisement

a matter of fact, it is essential that the camera's native time-out interval for
power-down is set to a value of one minute or more.
:wakeup
r = get_day_seconds
if r > e then
click "set"
click "set"
e = r + 50
endif
return
Finally, the subroutine zoom is responsible for performing the zoom opera-
tion, depending on the mode parameter m:
In Step mode, the current step value n is incremented by the value of the
f
direction indicator d. If n hits the lower or upper limit, d is inverted. Then
the physical step value is computed.
In Seconds mode, the physical step value is computed directly from the
f
pulse length.
After setting the new zoom level, a sleep command is issued to allow the
camera to adjust the lens before new USB signals are accepted:
:zoom
if m = 0 then
rem Step mode
n = n + d
if n = 0 or n = s then
d = -d
endif
c = (n * z + s / 2) / s
else
rem Seconds mode
i = s * 100 - 50
c = ((p - 50) * z + i / 2) / i
if c > z then
c = z
endif
endif
set_zoom c
sleep 500
return
5.7 Example scripts
185

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents