Author Topic: Canon 1200D  (Read 279953 times)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #550 on: April 28, 2018, 05:29:34 PM »
@dterrahe has been running the lua tests but is having problems posting to the forum. The 1200D did surprisingly well on the very first lua test run. Here's what he has to report:

Quote
Also: kicked off the lua test and left it running for a while. It seemed to be doing stuff, but the display got slightly corrupted so the letters become less readable. Then I noticed it was waiting for me to switch to M. Did that and a little later I think I could make out "script finished". It printed a few more lines but a while later it shut off. So I don't know if it reported success or failure. But I attached the log generated; hope that's enough.
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-27 20:25:21
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 0
    apex = -7.
    ms = 0
    value = 0
  aperture = table:
    raw = 40
    apex = 4.
    value = 4.
    min = table:
      raw = 40
      apex = 4.
      value = 4.
    max = table:
      raw = 88
      apex = 10.
      value = 32
  iso = table:
    raw = 0
    apex = 0
    value = 0
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5200
  mode = 2
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 1200D"
  model_short = "1200D"
  firmware = "1.0.2"
  temperature = 162
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  bulb = function: p
  wait = function: p
  reboot = function: p
  burst = function: p
  shoot = 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:
  clear = function: p
  write = function: p
  show = function: p
  hide = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  pause = function: p
  resume = function: p
  wait = function: p
  info = function: p
  stop = function: p
  start = function: p
lens = table:
  name = "EF70-300mm f/4-5.6 IS II USM"
  focal_length = 70
  focus_distance = 655350
  hyperfocal = 64613
  dof_near = 58837
  dof_far = 1000000
  af = true
  af_mode = 0
  autofocus = function: p
  focus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  rect = function: p
  pixel = function: p
  notify_box = function: p
  draw = function: p
  print = function: p
  off = function: p
  line = function: p
  clear = function: p
  screenshot = function: p
  on = function: p
  circle = function: p
  load = function: p
key = table:
  last = 10
  wait = function: p
  press = function: p
menu = table:
  visible = false
  get = function: p
  new = function: p
  select = function: p
  set = function: p
  open = function: p
  block = function: p
  close = function: p
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 102
  ms_clock = 102453
  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 = 9859
    folder_number = 100
    free_space = 6077536
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 9859
    folder_number = 100
    free_space = 6077536
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  date = table:
    hour = 20
    min = 25
    sec = 23
    month = 4
    year = 2018
    day = 27
    wday = 6
    isdst = false
    yday = 117
  rename = function: p
  call = function: p
  directory = function: p
  remove = 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:36: in function <ML/SCRIPTS/API_TEST.LUA:35>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:35: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:81: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:1338: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1364: in main chunktask = table:
  yield = function: p
  create = 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...
Start LiveView...
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...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Canon GUI tests completed.

Testing ML menu API...
Menu tests completed.

Testing picture taking functions...
Please switch to M mode.
Snap simulation test...
Single picture...
B:/DCIM/100CANON/IMG_9860.CR2 not found.
B:/DCIM/100CANON/IMG_9860.JPG not found.

Note that it couldn't find the image files. dterrahe figured out why:

Quote
Some further progress:

The take_pics test failed because I had the colorspace set to adobe; that causes filenames to start with "_MG" rather than "IMG"; so the script assert fails trying to find generated files. After switching back to sRGB it runs fine.

Quote
OK, I'm running into problems in test_camera_take_pics (which also corrupts the display font somewhat so it becomes hard to read), test_keys and test_lens_focus. Attached logs restarting after each failure.

Also attaching a really crappy phone picture of the screen corruption in the take_pics test.

Digging into each of these will take a bit more time but I hope to find some this weekend.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 06:20:18
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 99
    apex = 5.375
    ms = 24
    value = 0.024097
  aperture = table:
    raw = 53
    apex = 5.625
    value = 7.
    min = table:
      raw = 40
      apex = 4.
      value = 4.
    max = table:
      raw = 88
      apex = 10.
      value = 32
  iso = table:
    raw = 104
    apex = 9.
    value = 1600
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5200
  mode = 3
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 1200D"
  model_short = "1200D"
  firmware = "1.0.2"
  temperature = 171
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  shoot = function: p
  bulb = function: p
  reboot = function: p
  wait = function: p
  burst = 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:
  write = function: p
  show = function: p
  clear = function: p
  hide = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  stop = function: p
  pause = function: p
  start = function: p
  info = function: p
  wait = function: p
  resume = function: p
lens = table:
  name = "EF70-300mm f/4-5.6 IS II USM"
  focal_length = 70
  focus_distance = 5260
  hyperfocal = 36982
  dof_near = 4635
  dof_far = 6086
  af = true
  af_mode = 0
  focus = function: p
  autofocus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  rect = function: p
  load = function: p
  clear = function: p
  screenshot = function: p
  circle = function: p
  notify_box = function: p
  draw = function: p
  line = function: p
  pixel = function: p
  print = function: p
  on = function: p
  off = function: p
key = table:
  last = 10
  wait = function: p
  press = function: p
menu = table:
  visible = false
  open = function: p
  new = function: p
  block = function: p
  select = function: p
  set = function: p
  get = function: p
  close = function: p
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 173
  ms_clock = 173292
  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 = 9862
    folder_number = 100
    free_space = 5998272
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 9862
    folder_number = 100
    free_space = 5998272
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  date = table:
    hour = 6
    isdst = false
    month = 4
    year = 2018
    day = 28
    yday = 118
    wday = 7
    min = 20
    sec = 19
  rename = function: p
  call = function: p
  remove = function: p
  directory = 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:36: in function <ML/SCRIPTS/API_TEST.LUA:35>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:35: in function 'print_table'
ML/SCRIPTS/API_TEST.LUA:81: in function 'generic_tests'
ML/SCRIPTS/API_TEST.LUA:1338: in function 'api_tests'
ML/SCRIPTS/API_TEST.LUA:1364: in main chunktask = table:
  yield = function: p
  create = 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...
Exit MENU mode...
Start LiveView...
Pause LiveView...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Start LiveView...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Canon GUI tests completed.

Testing ML menu API...
Menu tests completed.

Testing picture taking functions...
Snap simulation test...
Single picture...
B:/DCIM/100CANON/IMG_9863.CR2 not found.
B:/DCIM/100CANON/IMG_9863.JPG not found.

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 06:41:44
===============================================================================

Module tests...
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...

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 07:05:50
===============================================================================

Module tests...
Testing module 'lv'...
Starting LiveView...
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: ML
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: disabled
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
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.


Testing lens focus functionality...
Autofocus outside LiveView...

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 07:10:43
===============================================================================

Module tests...
Testing exposure settings...
Camera    : Canon EOS 1200D (1200D) 1.0.2
Lens      : EF70-300mm f/4-5.6 IS II USM
Shoot mode: 3
Shutter   : Ç50 (raw 101, 0.020263s, 20ms, apex 5.625)
Aperture  : Å7.0 (raw 53, f/7., apex 5.625)
Av range  : Å4.0..Å32 (raw 40..88, f/4...f/32, apex 4...10.)
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!



Quote
The lens_focus seems to run fine, but it gets stuck waiting for something, filling the screen with dots. This happens within a loop so don't know how to skip in a useful way.

The keys test fails on:
        assert(key.last == KEY.HALFSHUTTER)

lens focus.LOG
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 11:23:59
===============================================================================

Module tests...

Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 3660
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...17...16...Autofocus triggered.
Autofocus completed.
Focus distance: 1200
Focusing backward...
Focus distance: 655350
Focus motor position: 7819
Focusing forward with step size 3, wait=true...
......
Focus distance: 1200
Focus motor position: 0
Focusing backward with step size 3, wait=true...
.....
Focus distance: 655350
Focus motor position: 7819
Focus range: 6 steps forward, 5 steps backward.
Motor steps: 7819 forward, 7819 backward, 0 lost.
Focusing forward with step size 3, wait=false...
.....................................................................
Focus distance: 1200
Focus motor position: 6
Focusing backward with step size 3, wait=false...
..............................................................
Focus distance: 655350
Focus motor position: 7819
Focus range: 69 steps forward, 62 steps backward.
Motor steps: 7813 forward, 7813 backward, 0 lost.
Focusing forward with step size 2, wait=true...
..........................
Focus distance: 1200
Focus motor position: 0
Focusing backward with step size 2, wait=true...
...........................
Focus distance: 655350
Focus motor position: 7819
Focus range: 26 steps forward, 27 steps backward.
Motor steps: 7819 forward, 7819 backward, 0 lost.
Focusing forward with step size 2, wait=false...
...

picture taking tests.LOG
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-28 11:19:15
===============================================================================

Module tests...
Testing picture taking functions...
Snap simulation test...
Single picture...
B:/DCIM/100CANON/IMG_9867.CR2 not found.
B:/DCIM/100CANON/IMG_9867.JPG: 47829
Two burst pictures...
Ideally, the camera should be in some continuous shooting mode (not checked).
B:/DCIM/100CANON/ABC_9868.CR2 not found.
B:/DCIM/100CANON/ABC_9868.JPG: 47638
B:/DCIM/100CANON/ABC_9869.CR2 not found.
B:/DCIM/100CANON/ABC_9869.JPG: 47470
Bracketed pictures...
B:/DCIM/100CANON/IMG_9870.CR2 not found.
B:/DCIM/100CANON/IMG_9870.JPG: 47402
B:/DCIM/100CANON/IMG_9871.CR2 not found.
B:/DCIM/100CANON/IMG_9871.JPG: 47120
B:/DCIM/100CANON/IMG_9872.CR2 not found.
B:/DCIM/100CANON/IMG_9872.JPG: 48754
Bulb picture...
Elapsed time: 11719
B:/DCIM/100CANON/IMG_9873.CR2 not found.
B:/DCIM/100CANON/IMG_9873.JPG: 48838
Picture taking tests completed.

Done!
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #551 on: April 29, 2018, 10:26:49 AM »
I reran the key test but now without pressing the shutter button (which previously I mistakenly thought I was asked to do). Passed fine now.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-29 08:04:15
===============================================================================

Module tests...
Testing half-shutter...
Half-shutter test OK.

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #552 on: April 29, 2018, 10:33:51 AM »
So it looks like the only remaining issue is with the lens focus test. I put on the 18-55 to see if that makes a difference. It just keeps running endlessly.

At the start it asks me to do a half-press; after that is there any further interaction required?

It seems to run fine, but is on a loop showing lines typically like:

Code: [Select]
Lens moving (0, 0)
Lens moving (11, 0)
etc

This goes on for at least 10 mins.

The log shows nothing interesting to me.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-29 08:10:45
===============================================================================

Testing lens focus functionality...
Focus distance: 760
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...17...16...15...14...13...12...Autofocus triggered.
Autofocus completed.
Focus distance: 760
Focusing backward...
Focus distance: 655350
Focus motor position: 620
Focusing forward with step size 3, wait=true...
.............
Focus distance: 250
Focus motor position: -1273
Focusing backward with step size 3, wait=true...
..........
Focus distance: 655350
Focus motor position: 650
Focus range: 13 steps forward, 10 steps backward.
Motor steps: 1893 forward, 1923 backward, 30 lost.
Focusing forward with step size 3, wait=false...
.....................................
Focus distance: 250
Focus motor position: -1263
Focusing backward with step size 3, wait=false...
.......................................
Focus distance: 655350
Focus motor position: 655
Focus range: 37 steps forward, 39 steps backward.
Motor steps: 1913 forward, 1918 backward, 5 lost.
Focusing forward with step size 2, wait=true...
.................................................................
Focus distance: 250
Focus motor position: -1303
Focusing backward with step size 2, wait=true...
..................................................................
Focus distance: 655350
Focus motor position: 658
Focus range: 65 steps forward, 66 steps backward.
Motor steps: 1958 forward, 1961 backward, 3 lost.
Focusing forward with step size 2, wait=false...
...
Focus distance: 250
Focus motor position: -1269
Focusing backward with step size 2, wait=false...
...
Focus distance: 655350
Focus motor position: 675
Focus range: 158 steps forward, 173 steps backward.
Motor steps: 1927 forward, 1944 backward, 17 lost.
Focusing forward with step size 1, wait=true...
...
Focus distance: 250
Focus motor position: 10888
Focusing backward with step size 1, wait=true...
...
Focus distance: 300
Focus motor position: 11582
Focus range: 14282 steps forward, 273 steps backward.
Motor steps: 10213 forward, 694 backward, 10907 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 250
Focus motor position: 11192
Focusing backward with step size 1, wait=false...
...

In the above, the forum code has truncated the ..... lines; some are very long.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: Canon 1200D
« Reply #553 on: April 29, 2018, 10:57:28 AM »
The lens is supposed to focus back and forth during this test; doesn't happen? The logs suggest it actually worked, to some extent, but got stuck at step size 1. Maybe it has to do with the mechanical condition of the lens.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 7360
Re: Canon 1200D
« Reply #554 on: April 29, 2018, 11:15:25 AM »
I haven't clocked it but focus test does take some time (depends on lens according to dfort). Comparing file date for LUA_TEST.LOG and time logged inside: 19 min. Looks like stuck at some point but it works.

May I suggest some changes to api_test.lua?
- Extensive beeps when asking for user interaction
- Timestamps for sub-tests.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #555 on: April 29, 2018, 12:54:08 PM »
The lens is supposed to focus back and forth during this test; doesn't happen? The logs suggest it actually worked, to some extent, but got stuck at step size 1. Maybe it has to do with the mechanical condition of the lens.

You are right; it is moving, even with the very last iteration of the loops where it gets stuck. It just never reaches the exit loop condition, whatever that is. It does the same thing with two different lenses, one of which is basically brand new so I hope it is not already broken :-)

I do not see the text "Lens moving", that appears on the screen while the test is running, anywhere in the lua script, so don't know where that's coming from. Is that within an API call that doesn't return until a "1" (accuracy?) is reached? All the Step 1s work except the last one. Strange?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: Canon 1200D
« Reply #556 on: April 29, 2018, 01:12:06 PM »
That comes from PROP_LV_FOCUS_DONE in lens.c; it's an event sent by the MPU (secondary processor that - in this case - executes the focus commands). The same MCU sends some flags telling whether the lens reached its limits, for example.

Previously, ML used to rely on these signals. Since I've noticed they are unreliable (see e.g. issue #2452), ML (in the lua_fix branch) also uses some heuristics to figure out whether the lens is still moving or not; however, I can imagine a situation where:
- the motor doesn't have enough force to push the focus limit microswitch (because of the tiny step commands)
- or maybe it just gets stuck in the middle (can happen with a DC motor when using tiny step commands, but unlikely with a stepper motor)
- however, the motor moves enough to change the encoder position (back and forth)

This last event can trick ML heuristics into believing the lens is still moving (it does not currently check the direction). In this case, the focus motor is going to hunt back and forth. Fixing this is non-trivial and requires a wide range of lenses to test on.

Long answer: https://www.magiclantern.fm/forum/index.php?topic=4997.msg175172#msg175172

For the Lua test, maybe I should limit the test to step sizes 3 and 2 (as 1 is likely very sensitive to lens mechanics).

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #557 on: April 29, 2018, 05:04:30 PM »
The time it takes to complete the lens test can vary a lot. On the 700D the 28-105mm f/3.5-4.5 USM, which is quite old and beat up, runs through the tests quickly while my newest lens, a second generation 50mm 1.8 STM (with the metal lens mount), seems to take forever. When testing EF-M lenses on the EOSM I ended up using a power adapter because the lens test would take so long that sometimes the battery would run out before the test completed.

An interesting addition to the lua tests would be how long it takes to complete each lens test.

You can edit the lua script that is in the ML/scripts directory on your card. Comment out all the tests except the lens test:

api_test.lua
Code: [Select]
function api_tests()
    menu.close()
    console.clear()
    console.show()
    test_log = logger("LUATEST.LOG")

    -- note: each test routine must print a blank line at the end
    -- strict_tests()
    -- generic_tests()
   
    printf("Module tests...\n")
    -- test_io()
    -- test_camera_gui()
    -- test_menu()
    -- test_camera_take_pics()
    -- sleep(1)
    -- test_multitasking()
    -- test_keys()
    -- test_lv()
    test_lens_focus()
    -- test_camera_exposure()
    -- test_movie()
   
    printf("Done!\n")
   
    test_log:close()
    key.wait()
    console.hide()
end

Now put a freshly charged battery or use a power adapter and give it plenty of time to complete the test.

Note that there are some other things that we can check here. If you set your lens to manual focus it should print:

Code: [Select]
Please enable autofocus.
(or, remove the lens from the camera to skip this test)

If you mount a manual lens or lens cap or simply remove the lens, the test should print:

Code: [Select]
This test requires an electronic lens.
manual lenses can't autofocus

BTW--Did the 1200D pass all of the other tests, including the ones that come after the lens focusing test?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #558 on: April 29, 2018, 08:39:28 PM »
BTW--Did the 1200D pass all of the other tests, including the ones that come after the lens focusing test?

Yep, I previously already ran all the other test (commenting out the three that were giving me trouble) so only the last, step 1, focus test is giving problems. I'm charging the battery now to see if I can run everything in one go and provide you with a clean log.

But to be honest, I'm not sure what the value is of knowing whether focusing with step 1 works, depending on the lens, if it takes many minutes. In my book, that means it doesn't work :-)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #559 on: April 29, 2018, 11:55:42 PM »
...if it takes many minutes. In my book, that means it doesn't work :-)

Does the 1200D have a continuous autofocus setting? Reason I ask is because I started running some tests and after 33 minutes on one of the lenses it was obvious that something weird was going on. Turned out that the default Canon settings turned on continuous autofocus. It should be off to run these tests:



I thought it might be interesting to run through all my lenses and post how long it takes to complete the lens test. Since I've also got some EF-M lenses and wanted to run everything on the same body I put on the EF-M to EF adapter along with a plug in power supply on one of my EOSMs and started testing. I'll update this post as I run through the lenses but thought that you might be interested in seeing the results I've gotten so far.

Note that the lens test starts with a prompt to put the lens in AF mode and to do a half-shutter press. The bulk of the testing happens after the autofocus confirmation so make sure you've got something you can focus on before starting the test.

LensTime
Canon EF 28-105mm f/3.5-4.5 II USM1:00
Canon EF 50mm f/1.8 STM3:22
Canon EF-S 17-55mm f/2.8 IS USM0:50

I'll update this post as I run through the lenses but thought that you might be interested in seeing the results I've gotten so far.

[EDIT] This turned out to be worthy of a separate topic so I started one called lua test_lens_focus() -- opened another can of worms with this.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #560 on: April 30, 2018, 08:23:19 AM »
AF was set to "AI Servo". I switched to One Shot and now the lens focus test passed. Yeah!

However, the first time I had left the camera running unattended after it passed lens focus to complete the remaining tests and later found it switched off, with the log cut off after
Code: [Select]
Testing module 'lv'...
LiveView is running; stopping...
Starting LiveView...
Overlays: Canon
Overlays: ML

I had seen it run through the lens focus module completely, so the results simply did not get saved.

On a second attempt, I saw it hang for a long time with this screen

. I had to pull the battery because it was not responding to anything. The log was cut off at the same point.

The test_camera_exposure function had previously run on its own when I had commenting everything else out, so it only seems to have a problem when running after all the other tests. Or maybe I had some setting switched on at the time that helped it out somehow.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #561 on: April 30, 2018, 08:58:39 AM »
Good catch on the AF settings. Lens focus test passed--that's a major one.

So on one attempt it failed the LiveView test and on the other attempt it failed the exposure test. Hum, those are the tests immediately before and after the lens focus test.

Yet those tests have succeeded when run by themselves, right? It is only failing when you tried a full test run?

Well, we know now that the 1200D can pass all of the lua tests, maybe just not all at once. It also passed the selftest module test, right? Let's go through our check list:

For every single camera model available on the Experiments page (lua_fix build), please run:

- api_test.lua (upload the log)
- selftest.mo -> stubs tests (upload the log)
- bench.mo -> memory benchmarks (upload the screenshot)
- overall sanity check (for example, if you decide to take this build out and use it for a couple of hours, please report back)

It is getting late here so I'm going offline for a while. Good luck with the tests!
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #562 on: April 30, 2018, 10:52:22 AM »
So on one attempt it failed the LiveView test and on the other attempt it failed the exposure test. Hum, those are the tests immediately before and after the lens focus test.

Nope, both times it passed all the tests up to and including focus test. Its just that the log file didn't record it. When it hung at the screen I showed the picture of, the log file still didn't show the focus test results even though I had seen it being completed successfully on the screen: the log was identical to the one for the first run that I posted. Maybe the file buffer doesn't get synced/flushed when the camera crashes hard?

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #563 on: April 30, 2018, 10:58:45 AM »
Quote
- bench.mo -> memory benchmarks (upload the screenshot)
- overall sanity check (for example, if you decide to take this build out and use it for a couple of hours, please report back)

Won't have time this evening, but will run bench soon.

If you'd read the London weather report, you wouldn't have suggested taking this build out. Unless it magically waterproofs the camera?

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #564 on: April 30, 2018, 04:31:14 PM »
The exposure tests will prompt you to switch between M and Av modes. Did that happen? Maybe the prompt didn't come up? I found that if I don't respond to a prompt soon enough it eventually times out and doesn't complete the test. You should be able to run the exposure test in any mode and it should prompt you to switch mode. Anyway, something to do on a rainy day.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #565 on: May 01, 2018, 06:01:11 AM »
Posted a new test build on my downloads page. The changes we made are now in the main branch so the 1200D development will continue with Canon firmware version 1.0.2.

The test build includes the lua_fix code so feel free to run the lua tests though when the weather clears up in London I hope @dterrahe will share some images and video with us.

@Raov - hope your 1200D comes back to life with the new firmware.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #566 on: May 01, 2018, 07:58:13 AM »




Only saw now you've got a new build up, so this was still run with the old one.


dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #567 on: May 01, 2018, 08:04:02 AM »
A question:
I haven't used ML on any other camera so don't know what I should expect/what works and how.
In many menu's, for example the benchmark menu, when descending into it, it shows top right a back arrow and Q ("<Q"). Does that mean I should be able to go back/up/out of the menu by pressing the Q key? That does not seem to work.

Raov

  • New to the forum
  • *
  • Posts: 15
  • #Full1200DPortWhen
Re: Canon 1200D
« Reply #568 on: May 01, 2018, 08:04:22 AM »
@Raov - hope your 1200D comes back to life with the new firmware.
i hope it will, cant wait to test the new build
1200D.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #569 on: May 01, 2018, 08:32:27 AM »
Ran the full lua test of the new build.

It spend quite a long time on the focus test again; since I didn't have that much time this morning, I half pressed the shutter once, which helped it get past that point.

It was then seemingly happily running the exposures test, feeding it random values, but suddenly (before it had asked me to do anything) it rebooted. Got back to the main screen with an overlayed message saying the camera had been uncleanly shut down and module loading was skipped.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: Canon 1200D
« Reply #570 on: May 01, 2018, 10:33:30 AM »
In many menu's, for example the benchmark menu, when descending into it, it shows top right a back arrow and Q ("<Q"). Does that mean I should be able to go back/up/out of the menu by pressing the Q key? That does not seem to work.

Works here in QEMU. You will also need the Q key to enter most submenus (some sort of right-click).

If it still doesn't work, enable Debug -> Show GUI events, and write down the button code.

Posted a build on the main page, too: https://builds.magiclantern.fm/1200D-102.html

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 1200D
« Reply #571 on: May 01, 2018, 04:32:32 PM »
It spend quite a long time on the focus test again; since I didn't have that much time this morning, I half pressed the shutter once, which helped it get past that point.

That sounds like you have Continuous AF activated. More information on this post.

...suddenly (before it had asked me to do anything) it rebooted...

That's weird. Ok--time to clear out the Canon settings, make sure to disable Continuous AF and try the new "official" build. I'm removing the unofficial 1200D build on my downloads page.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #572 on: May 01, 2018, 05:10:04 PM »
That sounds like you have Continuous AF activated. More information on this post.
No, I already disabled that (switched to "One Shot").

That's weird. Ok--time to clear out the Canon settings, make sure to disable Continuous AF and try the new "official" build. I'm removing the unofficial 1200D build on my downloads page.
I didn't change anything apart from the AF setting above after the last time I restored all canon and ML setting to factory/default.

But I'll install the new official build, clear all settings, try to remember AF and then run everything again. Oh, and fully charge the battery. And watch the screen to see if I'm required to press any buttons ;-)

dterrahe

  • New to the forum
  • *
  • Posts: 27
Re: Canon 1200D
« Reply #573 on: May 01, 2018, 08:49:41 PM »
Works here in QEMU. You will also need the Q key to enter most submenus (some sort of right-click).
Hm, I sort of thought that's what it was supposed to do, but I don't think it has ever worked.

If it still doesn't work, enable Debug -> Show GUI events, and write down the button code.
I'm getting two key codes for each press of Q: 4C and 1C

However, I now also saw in the menu that Q and PLAY do the same thing? I tested the PLAY button and indeed it does seem to open submenus and go back as required.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: Canon 1200D
« Reply #574 on: May 02, 2018, 11:42:05 AM »
This issue is quite puzzling.

I could easily identify this button code in QEMU. Canon firmware accepts both codes - the new one is used in recent cameras, so that makes a bit of sense. The only models still using the old button code are 1100D, 600D and 550D.

550D/600D/1100D/1200D in QEMU: old code (05 01 on the MPU side) is translated into PRESS_DIRECT_PRINT_BUTTON, new code (20 01) is translated into PRESS_UNAVI_BUTTON. They both do the same action on Canon UI (e.g. activate the settings screen).

550D clearly uses the old MPU code (05 01).

The puzzling part is that previous reports reference submenu options that could not be opened without the Q button. So, it must have worked. How did you guys open the submenus on earlier builds?! This can be answered by anyone still running the old firmware.

Is the button code different, depending on the camera mode? (for example, do you get the same code while in PLAY mode, in Canon menu, in LiveView, or in plain photo mode outside LV)?

Did the previous firmware send different button codes? I highly doubt this one.