How does this look? Using an old EF 28-105mm f/3.5-4.5 USM on the first test.
===============================================================================
ML/SCRIPTS/api_test.lua - 2017-11-13 23:22:37
===============================================================================
Strict mode tests...
Strict mode tests passed.
Generic tests...
camera = table:
shutter = table:
raw = 53
apex = -0.375
ms = 1297
value = 1.296839
aperture = table:
raw = 48
apex = 5
value = 5.599999
min = table:
raw = 39
apex = 3.875
value = 3.799999
max = table:
raw = 82
apex = 9.25
value = 24.6
iso = table:
raw = 96
apex = 8
value = 800
ec = table:
raw = 0
value = 0
flash_ec = table:
raw = 0
value = 0
kelvin = 5500
mode = 3
metering_mode = 3
drive_mode = 0
model = "Canon EOS 5D Mark III"
model_short = "5D3"
firmware = "1.3.4"
temperature = 154
state = 0
reboot = function: p
shoot = function: p
bulb = 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
write = function: p
clear = function: p
lv = table:
enabled = false
paused = false
running = false
zoom = 1
pause = function: p
info = function: p
stop = function: p
start = function: p
wait = function: p
resume = function: p
lens = table:
name = "EF28-105mm f/3.5-4.5 USM"
focal_length = 0
focus_distance = 14080
hyperfocal = 0
dof_near = 0
dof_far = 0
af = true
af_mode = 0
focus = function: p
display = table:
idle = true
height = 480
width = 720
line = function: p
rect = function: p
clear = function: p
screenshot = function: p
draw = function: p
off = function: p
notify_box = function: p
on = function: p
load = function: p
circle = function: p
print = function: p
pixel = function: p
key = table:
last = 0
press = function: p
wait = function: p
menu = table:
visible = false
open = function: p
get = function: p
new = function: p
close = function: p
block = function: p
set = function: p
testmenu = userdata:
value = 0
name = "Script API tests"
help = "Various tests for the Lua scripting API."
help2 = "When adding new Lua APIs, tests for them should go here."
advanced = 0
depends_on = 0
edit_mode = 0
hidden = false
icon_type = 5
jhidden = false
max = 0
min = 0
selected = true
shidden = false
starred = false
submenu_height = 0
submenu_width = 0
unit = 0
works_best_in = 0
run_in_separate_task = 0
select = function: p
update = nil
info = nil
rinfo = nil
warning = nil
movie = table:
recording = false
stop = function: p
start = function: p
dryos = table:
clock = 18
ms_clock = 18586
prefix = "1Y7A"
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 = "A:/"
path = "A:/DCIM/"
path = "A:/DCIM/100EOS5D/"
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 = 131072
drive_letter = "B"
file_number = 3186
folder_number = 100
free_space = 62705536
type = "SD"
_card_ptr = userdata
path = "B:/"
shooting_card = table:
cluster_size = 32768
drive_letter = "A"
file_number = 3186
folder_number = 100
free_space = 85787744
type = "CF"
_card_ptr = userdata
path = "A:/"
date = table:
min = 22
year = 2017
hour = 23
yday = 317
sec = 39
isdst = false
day = 13
month = 11
wday = 2
remove = function: p
directory = function: p
call = function: p
interval = table:
time = 10
count = 0
running = 0
stop = function: p
battery = table:
level = 84
id = 0
performance = 3
time = 15876
drain_rate = 19
task = table:
yield = function: p
create = function: p
property = table:
Generic tests completed.
Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Testing exposure settings, module 'camera'...
Camera : Canon EOS 5D Mark III (5D3) 1.3.4
Lens : EF28-105mm f/3.5-4.5 USM
Shoot mode: 3
Shutter : 1.3" (raw 53, 1.296839s, 1297ms, apex -0.375)
Aperture : Å5.6 (raw 48, f/5.599999, apex 5)
Av range : Å3.8..Å24 (raw 39..82, f/3.799999..f/24.6, apex 3.875..9.25)
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.
Testing module 'lv'...
LiveView is running; stopping...
Starting LiveView...
Setting zoom to x1...
Setting zoom to x5...
Setting zoom to x10...
Setting zoom to x5...
Setting zoom to x1...
Setting zoom to x10...
Setting zoom to x1...
Pausing LiveView...
Resuming LiveView...
Stopping LiveView...
LiveView tests completed.
Focus distance: 366080
Focusing backward...
Focus distance: 366080
Focusing forward with step size 3, wait=true...
....
Focus distance: 366080
Focusing backward with step size 3, wait=true...
....
Focus distance: 366080
Focus range: 4 steps forward, 4 steps backward.
Focusing forward with step size 3, wait=false...
....
Focus distance: 366080
Focusing backward with step size 3, wait=false...
....
Focus distance: 366080
Focus range: 4 steps forward, 4 steps backward.
Focusing forward with step size 2, wait=true...
................................
Focus distance: 366080
Focusing backward with step size 2, wait=true...
.................................
Focus distance: 366080
Focus range: 32 steps forward, 33 steps backward.
Focusing forward with step size 2, wait=false...
................................
Focus distance: 366080
Focusing backward with step size 2, wait=false...
.................................
Focus distance: 366080
Focus range: 32 steps forward, 33 steps backward.
Focusing forward with step size 1, wait=true...
...
Focus distance: 366080
Focusing backward with step size 1, wait=true...
...
Focus distance: 366080
Focus range: 260 steps forward, 262 steps backward.
Focusing forward with step size 1, wait=false...
...
Focus distance: 366080
Focusing backward with step size 1, wait=false...
...
Focus distance: 366080
Focus range: 260 steps forward, 259 steps backward.
Focus test completed.
Done!
Here is just the focus test with a much newer EF 50mm f/1.8 STM.
===============================================================================
ML/SCRIPTS/api_test.lua - 2017-11-13 23:34:25
===============================================================================
...
lens = table:
name = "EF50mm f/1.8 STM"
focal_length = 0
focus_distance = 14080
hyperfocal = 0
dof_near = 0
dof_far = 0
af = true
af_mode = 0
focus = function: p
...
Focus distance: 440320
Focusing backward...
Focus distance: 440320
Focusing forward with step size 3, wait=true...
.......................
Focus distance: 394240
Focusing backward with step size 3, wait=true...
......................
Focus distance: 437760
Focus range: 23 steps forward, 22 steps backward.
Focusing forward with step size 3, wait=false...
......................
Focus distance: 394240
Focusing backward with step size 3, wait=false...
......................
Focus distance: 437760
Focus range: 22 steps forward, 22 steps backward.
Focusing forward with step size 2, wait=true...
...
Focus distance: 394240
Focusing backward with step size 2, wait=true...
...
Focus distance: 440320
Focus range: 159 steps forward, 159 steps backward.
Focusing forward with step size 2, wait=false...
...
Focus distance: 394240
Focusing backward with step size 2, wait=false...
...
Focus distance: 440320
Focus range: 159 steps forward, 159 steps backward.
Focusing forward with step size 1, wait=true...
...
Focus distance: 394240
Focusing backward with step size 1, wait=true...
...
Focus distance: 440320
Focus range: 1053 steps forward, 1053 steps backward.
Focusing forward with step size 1, wait=false...
...
Focus distance: 394240
Focusing backward with step size 1, wait=false...
...
Focus distance: 440320
Focus range: 1052 steps forward, 1052 steps backward.
Focus test completed.
Done!