Time-Related Commands; Display-Related Commands - Canon Camera Hackers Manual

Camera hackers manual berthold daum
Table of Contents

Advertisement

122
C H A P T E R 5
Scripting

5.5.7 Time-related commands

sleep t
sleep(t)
Specifies how long the script will wait in milliseconds. The timer resolution depends
on the camera model and is in the range between 10–30 milliseconds.
s = get_day_seconds
s = get_day_seconds()
Returns the number of seconds since midnight.
t = get_tick_count
t = get_tick_count()
Returns the number of milliseconds since the camera was switched on.
t = get_time u
u = 0 returns second, u = 1 minute, u = 2 hour, u = 3 day, u = 4 month, u = 5 year.
t = get_time(u)
u = 's' returns second, u = 'm' minute, u = 'h' hour, u = 'D' day, u = 'M' month,
u = 'Y' year.

5.5.8 Display-related commands

x = get_display_mode
x = get_display_mode()
Returns the display mode: 0 = info, 1 = no info, 2 = off, 3 = electronic viewfinder.
shot_histo_enable x
shot_histo_enable(x)
Switches the histogram on or off: 0 = off, 1 = on.
get_histo_range s,h,p
p = get_histo_range(s,h)
Retrieves histogram data from the previous shot. A shadow value (0–1023) is speci-
fied in the variable s; a highlight value (s–1023) is specified in the variable h. The
value returned in variable p is the percent of pixels within that brightness range.
Can be used for sophisticated exposure control.
md_detect_motion ...
h = md_detect_motion(...)
Detects motion (section 5.7.3)
n = md_get_cell_diff
n = md_get_cell_diff()
Allows analyzing detected motion in more detail (section 5.7.3).
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua
uBasic
Lua

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents