EasyManua.ls Logo

Canon Camera - Page 193

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...
184 CHAPTER 5 Scripting
if b > 0 then b = 1 else b = 0
z = get_zoom_steps
if m = 0 then
s = s - 1 rem 0..s-1
if z < s then
s = z
endif
c = get_zoom
n = (c * s + z/2) / z
d = 1 rem zoom in
if n >= s then
d = -1 rem zoom out
endif
endif
set_zoom_speed 100
e = get_day_seconds + 50
The main while loop contains an inner do loop that waits on a signal from
the USB port. Within this loop, the display backlight is set to the desired
state. If power-down is to be inhibited, the subroutine wakeup is called.
When a USB signal arrives (indicated by p>0), the duration of the pulse
is analyzed. If the duration is shorter than 500 msec or if zooming had been
disabled by setting parameter s to a value <= 1, the camera is fired. Other-
wise, the subroutine zoom is executed. Afterwards, the script loops and
waits for the next signal:
while 1
do
set_backlight b
if t <= 0 then gosub "wakeup"
p = get_usb_power
until p > 0
print "USB Pulse",p * 10;"msec"
if p > 50 and s > 0 then
gosub "zoom"
else
shoot
endif
wend
end
The subroutine wakeup “tickles” the camera every 50 sec by pressing the
FUNC/SET button twice. This will keep the camera from powering down. As

Table of Contents

Related product manuals