7.9 Scripting
225
The SDM has also found a way around the slow speed of
uBasic
scripts. In
the CHDK, each script line (except comment lines) is executed in a new
time unit (10 msec). With the SDM, you can control the speed of execution.
The command:
set_script_speed s
accepts a value between 1 and 5, determining the number of script lines to
be executed within one time unit if physically possible. This setting can be
retrieved with:
get_script_speed s
SDM scripting can be quite different from CHDK scripting, and many CHDK
scripts will not run under the SDM without modifications. Fortunately,
there is an SDM version of the UBDB debugger (section 5.8), the
SDMUBDB
that can be downloaded from
www.zenoshrdlu.com/kapstuff/zsdmubdb.
html
. So you can do the testing and the script conversion conveniently on a
PC.
Button-related commands
take_photo_now
Identical to
shoot
(section 5.5.1).
shoot_movie_for s
Switches to
Movie mode,
records a movie for the specified time (seconds), and then
returns to
Record mode
.
wait_for_switch_press
Waits until a signal is present on the USB V+ pin (section 4.9.2).
Exposure-related commands
nd_filter_off
nd_filter_in
nd_filter_out
Identical to:
set_nd_filter 0
,
set_nd_filter 1
,
set_nd_filter 2
(section 5.5.2).
Summary of Contents for Camera
Page 1: ......
Page 2: ...The Canon Camera Hackers Manual ...
Page 3: ......
Page 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Page 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Page 25: ...16 CH APTER 3 ...
Page 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Page 213: ...204 CH APTER 6 ...
Page 253: ...244 AP PENDIX ...