Skip to content

Instantly share code, notes, and snippets.

@digiola
Created Oct 19, 2016
Embed
What would you like to do?
EOSM api_test.lua using hacked focus branch and EFS 17-55mm lens
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2016-10-19 16:04:47
===============================================================================
Strict mode tests...
Strict mode tests passed.
Generic tests...
camera = table:
shutter = table:
raw = 0
apex = -7.
ms = 0
value = 0
aperture = table:
raw = 56
apex = 6.
value = 8
min = table:
raw = 32
apex = 3.
value = 2.799999
max = table:
raw = 80
apex = 9
value = 22.6
iso = table:
raw = 96
apex = 8
value = 800
ec = table:
raw = 0
value = 0
flash_ec = table:
raw = 0
value = 0
kelvin = 6500
mode = 2
metering_mode = 1
drive_mode = 1
model = "Canon EOS M"
model_short = "EOSM"
firmware = "2.0.2"
temperature = 231
state = 0
bulb = function: p
shoot = function: p
burst = function: p
reboot = function: p
event = table:
pre_shoot = nil
post_shoot = nil
shoot_task = nil
seconds_clock = nil
keypress = nil
custom_picture_taking = nil
intervalometer = nil
config_save = nil
console = table:
hide = function: p
show = function: p
clear = function: p
write = function: p
lv = table:
enabled = true
paused = false
running = true
zoom = 1
stop = function: p
info = function: p
start = function: p
wait = function: p
resume = function: p
pause = function: p
lens = table:
name = "EF-S17-55mm f/2.8 IS USM"
focal_length = 31
focus_distance = 310
hyperfocal = 6353
dof_near = 296
dof_far = 324
af = true
af_mode = 0
focus = function: p
display = table:
idle = true
height = 480
width = 720
clear = function: p
off = function: p
pixel = function: p
notify_box = function: p
print = function: p
draw = function: p
load = function: p
rect = function: p
circle = function: p
on = function: p
line = function: p
screenshot = function: p
key = table:
last = 10
press = function: p
wait = function: p
menu = table:
visible = false
set = function: p
new = function: p
get = function: p
open = function: p
block = function: p
close = function: p
movie = table:
recording = false
start = function: p
stop = function: p
dryos = table:
clock = 18
ms_clock = 18427
prefix = "IMG_"
dcim_dir = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = nil
path = "B:/"
path = "B:/DCIM/"
path = "B:/DCIM/100CANON/"
config_dir = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = table:
exists = true
create = function: p
children = function: p
files = function: p
parent = nil
path = "B:/"
path = "ML/"
path = "ML/SETTINGS/"
ml_card = table:
cluster_size = 32768
drive_letter = "B"
file_number = 5698
folder_number = 100
free_space = 31117632
type = "SD"
_card_ptr = userdata
path = "B:/"
shooting_card = table:
cluster_size = 32768
drive_letter = "B"
file_number = 5698
folder_number = 100
free_space = 31117632
type = "SD"
_card_ptr = userdata
path = "B:/"
date = table:
min = 4
wday = 4
yday = 293
sec = 48
day = 19
isdst = false
year = 2016
month = 10
hour = 16
rename = function: p
remove = function: p
directory = function: p
call = function: p
interval = table:
time = 10
count = 0
running = false
stop = function: p
battery = table:
function not available on this camera
stack traceback:
[C]: in ?
[C]: in for iterator 'for iterator'
ML/SCRIPTS/LIB/logger.lua:125: in function 'logger.serialize'
ML/SCRIPTS/API_TEST.LUA:32: in function <ML/SCRIPTS/API_TEST.LUA:31>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:31: in function 'print_table'
ML/SCRIPTS/API_TEST.LUA:76: in function 'generic_tests'
ML/SCRIPTS/API_TEST.LUA:775: in function 'api_tests'
ML/SCRIPTS/API_TEST.LUA:792: in main chunktask = table:
create = function: p
yield = function: p
property = table:
Generic tests completed.
Module tests...
Testing file I/O...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Rename test: apple.txt -> banana.txt
Rename test OK
Rename test: apple.txt -> ML/banana.txt
Rename test OK
File I/O tests completed.
Testing half-shutter...
Half-shutter test OK.
Testing module 'lv'...
LiveView test doesn't apply to EOSM
skipping...
Testing lens focus functionality...
Focus distance: 310
Focusing backward...
Focus distance: 310
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 3, wait=true...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1487 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 3, wait=false...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 3, wait=false...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1487 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=true...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 2, wait=true...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1486 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=false...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 2, wait=false...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1486 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=true...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 1, wait=true...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1486 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=false...
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focusing backward with step size 1, wait=false...
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Focus distance: 310
Focus motor position: 0
Focus range: 1487 steps forward, 1486 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focus test completed.
Testing picture taking functions...
Please switch to M mode.
Snap simulation test...
Single picture...
Two burst pictures...
Ideally, the camera should be in some continuous shooting mode (not checked).
Bulb picture...
Elapsed time: 12236
Picture taking tests completed.
Testing exposure settings...
Camera : Canon EOS M (EOSM) 2.0.2
Lens : EF-S17-55mm f/2.8 IS USM
Shoot mode: 3
Shutter : Ç50 (raw 101, 0.020263s, 20ms, apex 5.625)
Aperture : Å8.0 (raw 56, f/8, apex 6.)
Av range : Å2.8..Å22 (raw 32..80, f/2.799999..f/22.6, apex 3...9)
ISO : 800 (raw 96, 800, apex 8)
EC : 0.0 (raw 0, 0 EV)
Flash EC : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.
Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment