182
C H A P T E R 5
Scripting
bv = get_bv96()
set_nd_filter(2)
tv = get_tv96()
av = get_av96()
Now, that we have
Bv96, Tv96,
and
Av96,
we can compute
Sv96
according
to the APEX formula (section 4.2.7). There is one modification here: we al-
low for a user-defined correction value as discussed above. After
Sv96
is
computed, the script checks to see whether it exceeds the maximum ac-
ceptable ISO value or is below the minimum possible ISO value. If yes, a
recalculation is performed. Finally, the
Sv96
value is set, the camera is fired,
and when the processing is done, the shutter button half-press is released:
sv = av + tv –
bv + compute_corr(tv)
if sv > maxSv then
tv = tv - (sv - maxSv)
sv = av + tv –
bv + compute_corr(tv)
end
if sv < minIso then
tv = tv - (sv - minIso)
sv = av + tv –
bv + compute_corr(tv)
end
set_sv96(sv)
sleep(10)
click("shoot_full")
repeat
sleep(1)
until not get_shooting()
release("shoot_half")
Before running this script, make sure that the values for
ND filter
and
ISO
speed
are not overridden in the CHDK
Overrides
.
5.7.5 Remote control
While CHDK features basic functions for controlling the camera through
the USB port (section 4.9), more sophisticated functionality can be achieved
by combining USB control with a script. Typically, such a script would use
the command
get_usb_power
to wait for an event from the remote control.
Содержание Camera
Страница 1: ......
Страница 2: ...The Canon Camera Hackers Manual ...
Страница 3: ......
Страница 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Страница 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Страница 25: ...16 CH APTER 3 ...
Страница 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Страница 213: ...204 CH APTER 6 ...
Страница 253: ...244 AP PENDIX ...