As EOSM2 Magic Lantern users (and abusers) know, I've been merging in Danne's EOSM experiments to my almost but not quite yet working EOSM2 bleeding edge branch and posting test builds. Today I merged in the latest lua_fix changes and tried running the Script API Tests. It turned up a problem in the menu test when trying to change the FPS override. Tried changing it manually and there does seem to be something weird going on.
Testing ML menu API...
ML/SCRIPTS/API_TEST.LUA:411: assertion failed!
stack traceback:
[C]: in function 'assert'
ML/SCRIPTS/API_TEST.LUA:411: in function 'test_menu'
ML/SCRIPTS/API_TEST.LUA:1573: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunk
I commented out test_menu() and got an error on the test_camera_take_pics(). This was a strange one because it asked to switch to M mode when the camera was already in manual mode.
Testing picture taking functions...
Please switch to M mode.
Snap simulation test...
Single picture...
ML/SCRIPTS/API_TEST.LUA:1029: attempt to call a nil value (method 'image_path')
stack traceback:
ML/SCRIPTS/API_TEST.LUA:1029: in function 'test_camera_take_pics'
ML/SCRIPTS/API_TEST.LUA:1574: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunk
Next issue, test_lv():
Testing module 'lv'...
LiveView is running; stopping...
ML/SCRIPTS/API_TEST.LUA:1240: assertion failed!
stack traceback:
[C]: in function 'globals.assert'
ML/SCRIPTS/API_TEST.LUA:1240: in function 'globals.test_lv'
ML/SCRIPTS/API_TEST.LUA:1578: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunk
So much for the tests that aren't working. Here is what is working:
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-3-23 12:38:09
===============================================================================
Strict mode tests...
Strict mode tests passed.
Generic tests...
arg = table:
[0] = "API_TEST.LUA"
camera = table:
shutter = table:
raw = 101
apex = 5.625
ms = 20
value = 0.020263
aperture = table:
raw = 48
apex = 5.
value = 5.6
min = table:
raw = 37
apex = 3.625
value = 3.5
max = table:
raw = 80
apex = 9.
value = 22.6
iso = table:
raw = 104
apex = 9.
value = 1600
ec = table:
raw = 0
value = 0
flash = "auto"
flash_ec = table:
raw = 0
value = 0
kelvin = 6500
mode = 3
metering_mode = 3
drive_mode = 0
model = "Canon EOS M2"
model_short = "EOSM2"
firmware = "1.0.3"
temperature = 196
gui = table:
menu = false
play = false
play_photo = false
play_movie = false
qr = false
idle = true
burst = function: p
reboot = function: p
shoot = function: p
wait = 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
write = function: p
clear = function: p
show = function: p
lv = table:
enabled = true
paused = false
running = true
zoom = 1
overlays = 2
info = function: p
wait = function: p
pause = function: p
resume = function: p
start = function: p
stop = function: p
lens = table:
name = "EF28-105mm f/3.5-4.5 USM"
focal_length = 28
focus_distance = 3900
hyperfocal = 7424
dof_near = 2582
dof_far = 8093
af = true
af_mode = 0
autofocus = function: p
focus = function: p
display = table:
idle = nil
height = 480
width = 720
notify_box = function: p
on = function: p
off = function: p
draw = function: p
load = function: p
line = function: p
clear = function: p
circle = function: p
pixel = function: p
rect = function: p
screenshot = function: p
print = function: p
key = table:
last = 9
press = function: p
wait = function: p
menu = table:
visible = false
open = function: p
new = function: p
get = function: p
select = function: p
close = function: p
block = function: p
set = function: p
movie = table:
recording = false
start = function: p
stop = function: p
dryos = table:
clock = 13
ms_clock = 13556
image_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 = 1560
folder_number = 100
free_space = 31112320
type = "SD"
path = "B:/"
_card_ptr = userdata
shooting_card = table:
cluster_size = 32768
drive_letter = "B"
file_number = 1560
folder_number = 100
free_space = 31112320
type = "SD"
path = "B:/"
_card_ptr = userdata
date = table:
year = 2019
isdst = false
day = 23
yday = 82
wday = 7
min = 38
sec = 11
month = 3
hour = 12
directory = function: p
rename = function: p
remove = 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:45: in function <ML/SCRIPTS/API_TEST.LUA:44>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:44: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:90: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:1568: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: 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 Canon GUI functions...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Start LiveView...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Canon GUI tests completed.
Testing multitasking...
Only one task allowed to interrupt...
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Multitasking tests completed.
Testing half-shutter...
Half-shutter test OK.
Testing lens focus functionality...
Focus distance: 3900
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
59...Autofocus triggered.
Autofocus completed.
Focus distance: 6820
Focusing backward...
Focus distance: 655350
Focus motor position: 10533
Focusing forward with step size 3, wait=true...
........
Focus distance: 470
Focus motor position: 293
Focusing backward with step size 3, wait=true...
....
Focus distance: 655350
Focus motor position: 10533
Focus range: 8 steps forward, 4 steps backward.
Motor steps: 10240 forward, 10240 backward, 0 lost.
Focusing forward with step size 3, wait=false...
..............................
Focus distance: 470
Focus motor position: 293
Focusing backward with step size 3, wait=false...
......................
Focus distance: 655350
Focus motor position: 10533
Focus range: 30 steps forward, 22 steps backward.
Motor steps: 10240 forward, 10240 backward, 0 lost.
Focusing forward with step size 2, wait=true...
.........................
Focus distance: 470
Focus motor position: 293
Focusing backward with step size 2, wait=true...
.....................
Focus distance: 655350
Focus motor position: 10533
Focus range: 25 steps forward, 21 steps backward.
Motor steps: 10240 forward, 10240 backward, 0 lost.
Focusing forward with step size 2, wait=false...
...............................................................................
Focus distance: 470
Focus motor position: 293
Focusing backward with step size 2, wait=false...
......................................................................
Focus distance: 655350
Focus motor position: 10533
Focus range: 79 steps forward, 70 steps backward.
Motor steps: 10240 forward, 10240 backward, 0 lost.
Focus test completed.
Testing exposure settings...
Camera : Canon EOS M2 (EOSM2) 1.0.3
Lens : EF28-105mm f/3.5-4.5 USM
Shoot mode: 3
Shutter : �50 (raw 101, 0.020263s, 20ms, apex 5.625)
Aperture : �5.6 (raw 48, f/5.6, apex 5.)
Av range : �3.5..�22 (raw 37..80, f/3.5..f/22.6, apex 3.625..9.)
ISO : �1600 (raw 104, 1600, apex 9.)
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 movie recording...
Please switch to Movie mode.
Movie recording tests completed.
Done!
Sometimes I feel like I'm trying to start an old car. Pull battery, pull card, reinsert battery, start camera without card, reinsert card... but hey, this is still a new port even though this topic was started back in September 2015.
In any case, these tests should point to areas that still need some more work. Any help would be greatly appreciated.