Author Topic: Lua Scripting (lua.mo)  (Read 142406 times)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3715
Re: Lua Scripting (lua.mo)
« Reply #400 on: March 23, 2018, 01:15:16 AM »
Next up 700D

I thought this one would just breeze through the tests but the problems started early in the testing.


api_test.lua
Code: [Select]
ML ASSERT:
0
at ../../src/raw.c:609 (raw_lv_realloc_buffer), task livev_hiprio_task
lv:0 mode:3

livev_hiprio_task stack: 1d70d8 [1d7250-1d3250]
0x000C26E0 @ ba728:1d7138
0x000C2650 @ c2740:1d7130
0x000C00BC @ c2680:1d7128
0x0007F5DC @ c025c:1d7108
0x0007EF78 @ 7f638:1d70d8

Magic Lantern version : Nightly.2018Mar22.700D115
Mercurial changeset   : eeb12511d8ce (lua_fix)
Built on 2018-03-22 15:48:25 UTC by rosiefort@RosieFoComputer.
Free Memory  : 148K + 2033K

Ugh. This is using the latest changeset. Ok--so maybe starting in Movie mode is a problem? It sat there with a prompt to "Please switch to M mode" but it was on M mode!



Figured out that what needed to be done was to switch to Photo mode. Then it got into the lens focus test which takes a while so I waited, and waited...



Yeah, that's the battery running out of juice.
Code: [Select]
...
Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 1650
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...17...16...15...14...13...Autofocus triggered.
Autofocus completed.
Focus distance: 2240
Focusing backward...

Cut to the chase, this was with the EFS 10-18mm STM lens and lua seems to have a problem with this rather new lens so I switched to an old beat up 28-105mm with "ULTRASONIC" focusing.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-3-22 16:57:17
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 72
    apex = 2.
    ms = 250
    value = 0.25
  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 = 72
    apex = 5.
    value = 100
  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 REBEL T5i"
  model_short = "700D"
  firmware = "1.1.5"
  temperature = 151
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  shoot = function: p
  burst = function: p
  reboot = function: p
  bulb = function: p
  wait = 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:
  show = function: p
  hide = function: p
  clear = function: p
  write = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  pause = function: p
  resume = function: p
  info = function: p
  wait = function: p
  stop = function: p
  start = function: p
lens = table:
  name = "EF28-105mm f/3.5-4.5 USM"
  focal_length = 28
  focus_distance = 6820
  hyperfocal = 7424
  dof_near = 3582
  dof_far = 82567
  af = true
  af_mode = 0
  focus = function: p
  autofocus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  load = function: p
  circle = function: p
  screenshot = function: p
  on = function: p
  off = function: p
  notify_box = function: p
  draw = function: p
  rect = function: p
  line = function: p
  pixel = function: p
  clear = function: p
  print = function: p
key = table:
  last = 10
  wait = function: p
  press = function: p
menu = table:
  visible = false
  close = function: p
  block = function: p
  set = function: p
  open = function: p
  select = function: p
  get = function: p
  new = function: p
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 10
  ms_clock = 10582
  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 = 2856
    folder_number = 100
    free_space = 30632800
    type = "SD"
    path = "B:/"
    _card_ptr = userdata
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 2856
    folder_number = 100
    free_space = 30632800
    type = "SD"
    path = "B:/"
    _card_ptr = userdata
  date = table:
    min = 57
    day = 22
    year = 2018
    sec = 18
    yday = 81
    wday = 5
    isdst = false
    hour = 16
    month = 3
  remove = function: p
  call = function: p
  rename = 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 '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:
  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...
Exit PLAY mode...
Start LiveView...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Stop LiveView...
Start LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Stop LiveView...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Start LiveView...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Start LiveView...
Enter MENU mode...
Exit 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_2857.CR2: 23307950
B:/DCIM/100CANON/IMG_2857.JPG not found.
Two burst pictures...
Ideally, the camera should be in some continuous shooting mode (not checked).
B:/DCIM/100CANON/ABC_2858.CR2: 23344953
B:/DCIM/100CANON/ABC_2858.JPG not found.
B:/DCIM/100CANON/ABC_2859.CR2: 23343067
B:/DCIM/100CANON/ABC_2859.JPG not found.
Bracketed pictures...
B:/DCIM/100CANON/IMG_2860.CR2: 20986212
B:/DCIM/100CANON/IMG_2860.JPG not found.
B:/DCIM/100CANON/IMG_2861.CR2: 23347363
B:/DCIM/100CANON/IMG_2861.JPG not found.
B:/DCIM/100CANON/IMG_2862.CR2: 26957563
B:/DCIM/100CANON/IMG_2862.JPG not found.
Bulb picture...
Elapsed time: 11727
B:/DCIM/100CANON/IMG_2863.CR2: 16875701
B:/DCIM/100CANON/IMG_2863.JPG not found.
Picture taking 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 module 'lv'...
Starting LiveView...
Overlays: ML
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: disabled
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: disabled
Overlays: ML
Overlays: disabled
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...
Focus distance: 610
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...17...16...15...14...13...Autofocus triggered.
Autofocus completed.
Focus distance: 880
Focusing backward...
Focus distance: 1100
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...
Focus distance: 470
Focus motor position: 0
Focusing backward with step size 3, wait=true...
....
Focus distance: 2590
Focus motor position: 0
Focus range: 3 steps forward, 4 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 3, wait=false...
........................
Focus distance: 470
Focus motor position: 0
Focusing backward with step size 3, wait=false...
...............................
Focus distance: 655350
Focus motor position: 0
Focus range: 24 steps forward, 31 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=true...
.......................................
Focus distance: 470
Focus motor position: 0
Focusing backward with step size 2, wait=true...
..........................................
Focus distance: 655350
Focus motor position: 0
Focus range: 39 steps forward, 42 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=false...
.................................................................................................
Focus distance: 510
Focus motor position: 0
Focusing backward with step size 2, wait=false...
...
Focus distance: 655350
Focus motor position: 0
Focus range: 97 steps forward, 113 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=true...
................................................................................................
Focus distance: 470
Focus motor position: 0
Focusing backward with step size 1, wait=true...
...........................................................................................
Focus distance: 655350
Focus motor position: 0
Focus range: 96 steps forward, 91 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 470
Focus motor position: 0
Focusing backward with step size 1, wait=false...
...
Focus distance: 655350
Focus motor position: 0
Focus range: 205 steps forward, 188 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.

Focus test completed.

Testing exposure settings...
Camera    : Canon EOS REBEL T5i (700D) 1.1.5
Lens      : EF28-105mm f/3.5-4.5 USM
Shoot mode: 3
Shutter   : �5 (raw 75, 0.192776s, 193ms, apex 2.375)
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!

selftest.mo -> stubs tests
Code: [Select]
[Pass] is_play_mode() => 0x1
[INFO] Camera model: Canon EOS REBEL T5i 1.1.5 (0x80000326 700D)
[Pass] is_camera("DIGIC", "*") => 0x1
[Pass] is_camera(__camera_model_short, firmware_version) => 0x1
[Pass] src = fio_malloc(size) => 0x4a104084
[Pass] dst = fio_malloc(size) => 0x4a908090
[Pass] memcmp(dst, src, 4097) => 0xffffff6a
[Pass] edmac_memcpy(dst, src, 4097) => 0x4a908090
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x4a908090
[Pass] memcmp(dst, src, size) => 0xffffffa8
[Pass] edmac_memcpy(dst, src, size) => 0x4a908090
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0x11
[Pass] edmac_memcpy_start(dst, src, size) => 0x4a908090
       dt => 0x2979
[Pass] copied => 0x400670
[Pass] copied => 0x400670
[Pass] copied => 0x400670
[Pass] memcmp(dst, src, copied) => 0x0
[Pass] memcmp(dst, src, copied + 16) => 0x8
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0x7f5888
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x1170
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0xef
[Pass] tries[1] => 0xfc
[Pass] tries[2] => 0x100
[Pass] tries[3] => 0xfd
[Pass] failr[0] => 0x73
[Pass] failw[0] => 0xcb
[Pass] failr[1] => 0x6b
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[Pass] failw[2] => 0xec
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x1d
       times[1] / tries[1] => 0x1d
       times[2] / tries[2] => 0x1d
       times[3] / tries[3] => 0x1d
Cache tests finished.

[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] f = FIO_CreateFile("test.dat") => 0x3
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x4084cb04
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x3
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x4a104084
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x3
[Pass] FIO_SeekSkipFile(f, 0, SEEK_END) => 0x82000000
[Pass] FIO_WriteFile(f, buf, 0x10) => 0x10
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0x81fffff0
[Pass] FIO_WriteFile(f, buf, 0x30) => 0x30
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000020
[Pass] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xad6c
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x1
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xaddc
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x2ed32
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0x113
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0xf9
[Pass] ABS((get_us_clock() - t0) - 110000) => 0x21d
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x2ed34
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0x2a9
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0x28d
[Pass] ABS((get_us_clock() - t0) - 310000) => 0xf7
       t0 = GET_DIGIC_TIMER() => 0x2a30f
       msleep(250)
       t1 = GET_DIGIC_TIMER() => 0x667c4
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x4
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x17
       Date/time: 2018/03/22 17:17:23
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x18
[Pass] MOD(s1-s0, 60) => 0x1
[Pass] MOD(s1-s0, 60) => 0x1
       m0 = MALLOC_FREE_MEMORY => 0x25e00
[Pass] p = (void*)_malloc(50*1024) => 0x1199e8
[Pass] CACHEABLE(p) => 0x1199e8
       m1 = MALLOC_FREE_MEMORY => 0x195f0
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x25e00
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x324348
[Pass] p = (void*)_AllocateMemory(128*1024) => 0x84cac4
[Pass] CACHEABLE(p) => 0x84cac4
       m1 = GetFreeMemForAllocateMemory() => 0x30433c
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x324348
[Pass] ABS((m0-m1) - 128*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x25e00
       m02 = GetFreeMemForAllocateMemory() => 0x324348
[Pass] p = (void*)_alloc_dma_memory(128*1024) => 0x4084cb04
[Pass] UNCACHEABLE(p) => 0x4084cb04
[Pass] CACHEABLE(p) => 0x84cb04
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x4084cb04
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(16*1024*1024) => 0x4a104074
[Pass] UNCACHEABLE(p) => 0x4a104074
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x25e00
       m12 = GetFreeMemForAllocateMemory() => 0x324348
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(16*1024*1024) => 0x1199e8
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x119a10
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a104070
[Pass] UNCACHEABLE(p) => 0x4a104070
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0x1199e8
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x21c4000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x119a10
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x21c4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4ddc0064
[Pass] UNCACHEABLE(p) => 0x4ddc0064
       largest_shoot_block = suite->size => 0x21c4000
[INFO] largest_shoot_block: 34MB
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(largest_shoot_block + 1024*1024) => 0x1199e8
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x2
[Pass] suite->size => 0x22c4000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x119a10
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x18b8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a104070
[Pass] UNCACHEABLE(p) => 0x4a104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119a70
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x22c4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42200064
[Pass] UNCACHEABLE(p) => 0x42200064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x22c4000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0x1199e8
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x7
[Pass] suite->size => 0x5b00000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x119a10
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x18b8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a104070
[Pass] UNCACHEABLE(p) => 0x4a104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119a70
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x36b4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42200064
[Pass] UNCACHEABLE(p) => 0x42200064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119aa8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3ab4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x419ff0a4
[Pass] UNCACHEABLE(p) => 0x419ff0a4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119ae0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3b8c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x49f240e4
[Pass] UNCACHEABLE(p) => 0x49f240e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119b18
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3c64000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x47f240e4
[Pass] UNCACHEABLE(p) => 0x47f240e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119b50
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3d3c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x45f240e4
[Pass] UNCACHEABLE(p) => 0x45f240e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x119b88
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5b00000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4ddc0064
[Pass] UNCACHEABLE(p) => 0x4ddc0064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x5b00000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x1b3c8c
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x1b3c60
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x1b3c40
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[Pass] bar => '****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0xdda800c6
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[Pass] get_task_name_from_id(current_task->taskId) => 'run_test'
[Pass] task_max => 0x68
[Pass] task_max => 0x68
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0xddaa00b0
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0xddac027c
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0xddae00a4
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[Pass] display_idle() => 0x1
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[Pass] HALFSHUTTER_PRESSED => 0x1
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x1
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x1
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
=========================================================
Test complete, 11782 passed, 0 failed.
.

bench.mo -> memory benchmarks


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

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3715
Re: Lua Scripting (lua.mo)
« Reply #401 on: March 23, 2018, 01:42:13 AM »
7D

api_test.lua
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-3-22 16:20:24
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 104
    apex = 6.
    ms = 16
    value = 0.015625
  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 = 72
    apex = 5.
    value = 100
  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 7D"
  model_short = "7D"
  firmware = "2.0.3"
  temperature = 146
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  burst = function: p
  shoot = function: p
  bulb = function: p
  wait = 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:
  write = function: p
  show = function: p
  clear = function: p
  hide = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  info = function: p
  start = function: p
  stop = function: p
  pause = function: p
  wait = function: p
  resume = function: p
lens = table:
  name = "EF28-105mm f/3.5-4.5 USM"
  focal_length = 28
  focus_distance = 655350
  hyperfocal = 7424
  dof_near = 7342
  dof_far = 1000000
  af = true
  af_mode = 0
  autofocus = function: p
  focus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  off = function: p
  screenshot = function: p
  notify_box = function: p
  draw = function: p
  load = function: p
  pixel = function: p
  circle = function: p
  rect = function: p
  on = function: p
  clear = function: p
  line = function: p
  print = function: p
key = table:
  last = 20
  press = function: p
  wait = function: p
menu = table:
  visible = false
  set = function: p
  close = function: p
  open = function: p
  get = function: p
  select = function: p
  block = function: p
  new = function: p
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 14
  ms_clock = 14625
  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 = "A:/"
      path = "A:/DCIM/"
    path = "A:/DCIM/100EOS7D/"
  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 = "A:/"
      path = "ML/"
    path = "ML/SETTINGS/"
  ml_card = table:
    cluster_size = 32768
    drive_letter = "A"
    file_number = 9999
    folder_number = 100
    free_space = 31216704
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "A"
    file_number = 9999
    folder_number = 100
    free_space = 31216704
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  date = table:
    min = 20
    sec = 24
    wday = 5
    year = 2018
    isdst = false
    month = 3
    hour = 16
    day = 22
    yday = 81
  call = function: p
  remove = function: p
  directory = function: p
  rename = function: p
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: p
battery = table:
  level = 76
  id = 0
  performance = 3
  time = nil
  drain_rate = 33
task = 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...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Canon GUI tests completed.

Testing ML menu API...
Menu tests completed.

Testing picture taking functions...
Snap simulation test...
Single picture...

Like the EOSM the 7D didn't get through the test though it failed on a different test.



selftest.mo -> stubs tests
Code: [Select]
[Pass] is_play_mode() => 0x1
[INFO] Camera model: Canon EOS 7D 2.0.3 (0x80000250 7D)
[Pass] is_camera("DIGIC", "*") => 0x1
[Pass] is_camera(__camera_model_short, firmware_version) => 0x1
[Pass] src = fio_malloc(size) => 0x423280a8
[Pass] dst = fio_malloc(size) => 0x42b2c0b4
[Pass] memcmp(dst, src, 4097) => 0x35
[Pass] edmac_memcpy(dst, src, 4097) => 0x42b2c0b4
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x42b2c0b4
[Pass] memcmp(dst, src, size) => 0x55
[Pass] edmac_memcpy(dst, src, size) => 0x42b2c0b4
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0x45
[Pass] edmac_memcpy_start(dst, src, size) => 0x42b2c0b4
       dt => 0x3ab7
[Pass] copied => 0x400acc
[Pass] copied => 0x400acc
[Pass] copied => 0x400acc
[Pass] memcmp(dst, src, copied) => 0x0
[Pass] memcmp(dst, src, copied + 16) => 0xffffff7f
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0x908b70
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x630
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0xdf
[Pass] tries[1] => 0xfc
[Pass] tries[2] => 0x101
[Pass] tries[3] => 0x10c
[Pass] failr[0] => 0x87
[Pass] failw[0] => 0xb5
[Pass] failr[1] => 0x81
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[Pass] failw[2] => 0xe4
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x1d
       times[1] / tries[1] => 0x1f
       times[2] / tries[2] => 0x1f
       times[3] / tries[3] => 0x1f
Cache tests finished.

[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[FAIL] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[FAIL] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[FAIL] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] f = FIO_CreateFile("test.dat") => 0x3
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x40b077bc
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x3
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x423280a8
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x3
[Pass] FIO_SeekSkipFile(f, 0, SEEK_END) => 0x82000000
[Pass] FIO_WriteFile(f, buf, 0x10) => 0x10
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0x81fffff0
[Pass] FIO_WriteFile(f, buf, 0x30) => 0x30
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000020
[Pass] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xbb6
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x3
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xbd8
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x26cc
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0x136
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0x110
[Pass] ABS((get_us_clock() - t0) - 110000) => 0x115
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x26d4
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0x1ad
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0x188
[Pass] ABS((get_us_clock() - t0) - 310000) => 0x103
       t0 = GET_DIGIC_TIMER() => 0x75640
       msleep(250)
       t1 = GET_DIGIC_TIMER() => 0xb1174
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x6
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x36
       Date/time: 2018/03/22 16:31:54
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x38
[Pass] MOD(s1-s0, 60) => 0x2
[Pass] MOD(s1-s0, 60) => 0x2
       m0 = MALLOC_FREE_MEMORY => 0x59698
[Pass] p = (void*)_malloc(50*1024) => 0xaa2f0
[Pass] CACHEABLE(p) => 0xaa2f0
       m1 = MALLOC_FREE_MEMORY => 0x4ce88
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x59698
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x290c80
[Pass] p = (void*)_AllocateMemory(128*1024) => 0x998944
[Pass] CACHEABLE(p) => 0x998944
       m1 = GetFreeMemForAllocateMemory() => 0x270c74
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x290c80
[Pass] ABS((m0-m1) - 128*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x59698
       m02 = GetFreeMemForAllocateMemory() => 0x290c80
[Pass] p = (void*)_alloc_dma_memory(128*1024) => 0x40998984
[Pass] UNCACHEABLE(p) => 0x40998984
[Pass] CACHEABLE(p) => 0x998984
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x40998984
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(16*1024*1024) => 0x42328098
[Pass] UNCACHEABLE(p) => 0x42328098
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x59698
       m12 = GetFreeMemForAllocateMemory() => 0x290c80
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(16*1024*1024) => 0xaa2f0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xaa318
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42328094
[Pass] UNCACHEABLE(p) => 0x42328094
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0xaa2f0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1f80000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xaa318
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1f80000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x52000064
[Pass] UNCACHEABLE(p) => 0x52000064
       largest_shoot_block = suite->size => 0x1f80000
[INFO] largest_shoot_block: 32MB
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(largest_shoot_block + 1024*1024) => 0xaa2f0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x2
[Pass] suite->size => 0x2080000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xaa318
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x17d4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42328094
[Pass] UNCACHEABLE(p) => 0x42328094
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa378
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2080000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x52000064
[Pass] UNCACHEABLE(p) => 0x52000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x2080000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0xaa2f0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0xb
[Pass] suite->size => 0xb700000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xaa318
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x17d4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42328094
[Pass] UNCACHEABLE(p) => 0x42328094
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa378
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3754000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x52000064
[Pass] UNCACHEABLE(p) => 0x52000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa3b0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x37d0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5bf800e4
[Pass] UNCACHEABLE(p) => 0x5bf800e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa3e8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x384c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x59f800e4
[Pass] UNCACHEABLE(p) => 0x59f800e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa420
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x38c8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x57f800e4
[Pass] UNCACHEABLE(p) => 0x57f800e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa458
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3944000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x55f800e4
[Pass] UNCACHEABLE(p) => 0x55f800e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa490
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x39c0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x53f800e4
[Pass] UNCACHEABLE(p) => 0x53f800e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa4c8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5940000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x54000064
[Pass] UNCACHEABLE(p) => 0x54000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa500
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x78c0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x56000064
[Pass] UNCACHEABLE(p) => 0x56000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa538
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x9840000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x58000064
[Pass] UNCACHEABLE(p) => 0x58000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xaa570
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb700000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a000064
[Pass] UNCACHEABLE(p) => 0x5a000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0xb700000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x191c54
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x191c20
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x191c00
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[Pass] bar => '****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0x189800bc
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[Pass] get_task_name_from_id(current_task->taskId) => 'run_test'
[Pass] task_max => 0x68
[Pass] task_max => 0x68
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0x189a0090
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0x189c0300
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0x189e007a
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[Pass] display_idle() => 0x1
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[Pass] HALFSHUTTER_PRESSED => 0x1
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x1
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x1
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
=========================================================
Test complete, 12095 passed, 7 failed.
.

Failed a few tests. Looks like some of the iterations of HALFSHUTTER_PRESSED and get_focus_confirmation.

bench.mo -> memory benchmarks
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

l_d_allan

  • Senior
  • ****
  • Posts: 258
Drain battery until 50% to 90% using Lua script suggested by A1ex?
« Reply #402 on: March 28, 2018, 12:32:01 AM »
*** EDIT ***
Starting to work, but seems to time-out. See Feature Request for more info.

This rusty C++ developer (and Lua pre-newbie) hopes a Feature Request can be accomplished with a Lua script suggested by A1ex.

Suggested PoC Lua loop from A1ex earlier today with hard-wired parameters of 10 second delay until battery at 50%:
Quote
Code: [Select]
-- Discharge battery until 50%
-- battery.level is reported in percentage
while battery.level > 50 do
    -- optionally print battery level somewhere (exercise for the reader)
    msleep(10000)
end

tl;dr ? Sorry ...

The intention is to "baby" the Li-Ion battery so that it isn't stored for an extended period of time at 100%. My impression is this can be preferred to get a longer life-time out of the battery. So, maybe our batteries would last 5 years instead of 3?

I realize this issue may be a "Who cares?" ... since reputable knock-off clones aren't that expensive.

Actual script might have a parameter of 90% rather than 50%.

Perhaps issue a "Beep" or "Flash Light" within the loop to confirm something is happening. Or actually cause the text with the Battery Percent to show up on the LCD screen.

lojzik

  • New to the forum
  • *
  • Posts: 48
Re: Lua Scripting (lua.mo)
« Reply #403 on: April 04, 2018, 11:34:37 AM »
magiclantern-lua_fix.2018Mar31.70D112 test

stubtest.log ok (in previous builds was problem)
Code: [Select]
[Pass] is_play_mode() => 0x1
[INFO] Camera model: Canon EOS 70D 1.1.2 (0x80000325 70D)
[Pass] is_camera("DIGIC", "*") => 0x1
[Pass] is_camera(__camera_model_short, firmware_version) => 0x1
[Pass] src = fio_malloc(size) => 0x42104084
[Pass] dst = fio_malloc(size) => 0x42908090
[Pass] memcmp(dst, src, 4097) => 0x26
[Pass] edmac_memcpy(dst, src, 4097) => 0x42908090
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x42908090
[Pass] memcmp(dst, src, size) => 0x2f
[Pass] edmac_memcpy(dst, src, size) => 0x42908090
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0x1d
[Pass] edmac_memcpy_start(dst, src, size) => 0x42908090
       dt => 0x1822
[Pass] copied => 0x400a70
[Pass] copied => 0x400a70
[Pass] copied => 0x400a70
[Pass] memcmp(dst, src, copied) => 0x0
[Pass] memcmp(dst, src, copied + 16) => 0x26
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0x8d2634
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x1160
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0xf1
[Pass] tries[1] => 0xf6
[Pass] tries[2] => 0x105
[Pass] tries[3] => 0xfc
[Pass] failr[0] => 0x6b
[Pass] failw[0] => 0xbc
[Pass] failr[1] => 0x77
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[Pass] failw[2] => 0xda
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x2d
       times[1] / tries[1] => 0x2a
       times[2] / tries[2] => 0x2a
       times[3] / tries[3] => 0x2d
Cache tests finished.

[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] f = FIO_CreateFile("test.dat") => 0x6
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x40933aa4
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x6
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x42104084
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x6
[Pass] FIO_SeekSkipFile(f, 0, SEEK_END) => 0x82000000
[Pass] FIO_WriteFile(f, buf, 0x10) => 0x10
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0x81fffff0
[Pass] FIO_WriteFile(f, buf, 0x30) => 0x30
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000020
[Pass] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xaa32
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x2
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xaa96
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x387c0
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0xe9
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0xd3
[Pass] ABS((get_us_clock() - t0) - 110000) => 0x64
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x387c2
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0xd4
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0xbc
[Pass] ABS((get_us_clock() - t0) - 310000) => 0x52
       t0 = GET_DIGIC_TIMER() => 0x8ccb
       msleep(250)
       t1 = GET_DIGIC_TIMER() => 0x44e36
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x4
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x2d
       Date/time: 2018/04/04 10:18:45
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x2f
[Pass] MOD(s1-s0, 60) => 0x2
[Pass] MOD(s1-s0, 60) => 0x2
       m0 = MALLOC_FREE_MEMORY => 0x4b5e8
[Pass] p = (void*)_malloc(50*1024) => 0x113500
[Pass] CACHEABLE(p) => 0x113500
       m1 = MALLOC_FREE_MEMORY => 0x3edd8
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x4b5e8
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x24337c
[Pass] p = (void*)_AllocateMemory(128*1024) => 0x933a64
[Pass] CACHEABLE(p) => 0x933a64
       m1 = GetFreeMemForAllocateMemory() => 0x223370
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x24337c
[Pass] ABS((m0-m1) - 128*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x4b5e8
       m02 = GetFreeMemForAllocateMemory() => 0x24337c
[Pass] p = (void*)_alloc_dma_memory(128*1024) => 0x40933aa4
[Pass] UNCACHEABLE(p) => 0x40933aa4
[Pass] CACHEABLE(p) => 0x933aa4
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x40933aa4
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(16*1024*1024) => 0x42104074
[Pass] UNCACHEABLE(p) => 0x42104074
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x4b5e8
       m12 = GetFreeMemForAllocateMemory() => 0x24337c
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(16*1024*1024) => 0x113458
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x113500
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0x113458
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x2000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x113500
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       largest_shoot_block = suite->size => 0x2000000
[INFO] largest_shoot_block: 32MB
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(largest_shoot_block + 1024*1024) => 0x113458
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x2
[Pass] suite->size => 0x2100000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x113500
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113538
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2100000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4410407c
[Pass] UNCACHEABLE(p) => 0x4410407c
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x2100000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0x113458
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x14
[Pass] suite->size => 0xf700000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x113500
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113538
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x220c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4410407c
[Pass] UNCACHEABLE(p) => 0x4410407c
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113570
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x22f4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x48b140e4
[Pass] UNCACHEABLE(p) => 0x48b140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1135a8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x23dc000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x467140e4
[Pass] UNCACHEABLE(p) => 0x467140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1135e0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x24c4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5c9140e4
[Pass] UNCACHEABLE(p) => 0x5c9140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113618
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x25ac000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a5140e4
[Pass] UNCACHEABLE(p) => 0x5a5140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113650
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2694000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x581140e4
[Pass] UNCACHEABLE(p) => 0x581140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113688
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x277c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4af140e4
[Pass] UNCACHEABLE(p) => 0x4af140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1136c0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2864000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x443140e4
[Pass] UNCACHEABLE(p) => 0x443140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1136f8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4864000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x48c00064
[Pass] UNCACHEABLE(p) => 0x48c00064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113730
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4b78000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4ac00070
[Pass] UNCACHEABLE(p) => 0x4ac00070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113768
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x6b78000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x55e00064
[Pass] UNCACHEABLE(p) => 0x55e00064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1137a0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x6e8c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x57e00070
[Pass] UNCACHEABLE(p) => 0x57e00070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1137d8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x8e8c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x58200064
[Pass] UNCACHEABLE(p) => 0x58200064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113810
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x91a0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a200070
[Pass] UNCACHEABLE(p) => 0x5a200070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113848
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb1a0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a600064
[Pass] UNCACHEABLE(p) => 0x5a600064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113880
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb4b4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5c600070
[Pass] UNCACHEABLE(p) => 0x5c600070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1138b8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xd4b4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x44400064
[Pass] UNCACHEABLE(p) => 0x44400064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1138f0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xd7c8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46400070
[Pass] UNCACHEABLE(p) => 0x46400070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x113928
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xf700000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46800064
[Pass] UNCACHEABLE(p) => 0x46800064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0xf700000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x21b32c
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x21b300
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x21b2e0
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[Pass] bar => '****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0xdb6c00f0
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[Pass] get_task_name_from_id(current_task->taskId) => 'run_test'
[Pass] task_max => 0x84
[Pass] task_max => 0x84
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0xdb6e00c8
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0xdb7002aa
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0xdb7200e0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[Pass] display_idle() => 0x1
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[Pass] HALFSHUTTER_PRESSED => 0x1
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x1
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x1
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
=========================================================
Test complete, 12822 passed, 0 failed.
.

luatest.log assertion failed on line 944
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-4 10:20:31
===============================================================================

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 = 56
    apex = 6.
    value = 8.
    min = table:
      raw = 48
      apex = 5.
      value = 5.6
    max = table:
      raw = 91
      apex = 10.375001
      value = 36.400001
  iso = table:
    raw = 72
    apex = 5.
    value = 100
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 6400
  mode = 2
  metering_mode = 3
  drive_mode = 17
  model = "Canon EOS 70D"
  model_short = "70D"
  firmware = "1.1.2"
  temperature = 158
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  shoot = function: p
  bulb = function: p
  wait = 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
  clear = function: p
  show = function: p
  write = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  wait = function: p
  start = function: p
  stop = function: p
  info = function: p
  resume = function: p
  pause = function: p
lens = table:
  name = "EF-S18-135mm f/3.5-5.6 IS STM"
  focal_length = 135
  focus_distance = 520
  hyperfocal = 120171
  dof_near = 519
  dof_far = 520
  af = true
  af_mode = 0
  autofocus = function: p
  focus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  pixel = function: p
  notify_box = function: p
  print = function: p
  line = function: p
  screenshot = function: p
  draw = function: p
  circle = function: p
  rect = function: p
  clear = function: p
  off = function: p
  on = function: p
  load = function: p
key = table:
  last = 10
  press = function: p
  wait = function: p
menu = table:
  visible = false
  open = function: p
  block = function: p
  get = function: p
  new = function: p
  select = function: p
  set = function: p
  close = function: p
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 16
  ms_clock = 16782
  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 = 5136
    folder_number = 100
    free_space = 15559680
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 5136
    folder_number = 100
    free_space = 15559680
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  date = table:
    yday = 94
    isdst = false
    year = 2018
    month = 4
    min = 20
    hour = 10
    day = 4
    sec = 32
    wday = 4
  remove = function: p
  rename = function: p
  directory = function: p
  call = function: p
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: p
battery = table:
  level = 17
  id = 2
  performance = 3
  time = nil
  drain_rate = 92
task = 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...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
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...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Start LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Stop LiveView...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
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_5137.CR2: 25356804
B:/DCIM/100CANON/IMG_5137.JPG not found. 

memory benchmark stops on memcpy cacheable (verifying)
70D.112

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #404 on: April 10, 2018, 05:17:00 PM »
Been poking around lua snippets a while thinking about automating darkframe creation in camera. The idea goes something like this:
I record a my mlv files and as a last step I activate a luascript which does following:
1 - Gets metadata info from an mlv file to be used when creating the corresponding darkframe file

2- Records the darkframe file depending on what metadata information the script finds in the corresponding mlv. This means I would need the script to find shutter/iso/camera name and so on.

3 - Once the darkframe is recorded the script moves on to the next mlv and if it´s the same setting as a darkframe file already created it simply skips this file and moves on to check the next mlv and so on.

By using the script one can simply leave out darkframe creation while filming and simply do this in post while mlv files still are on CF/SD card. Now I havn´t seen any examples of lua finding mlv metadata so that is my first question. is it even possible to fetch metadata from an mlv? Only script I can find which seems to do this is here:
https://bitbucket.org/hudson/magic-lantern/src/raw_benchmark/scripts/extra/rawbench.lua?fileviewer=file-view-default

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: Lua Scripting (lua.mo)
« Reply #405 on: April 10, 2018, 05:35:35 PM »
There is a Lua script that can read some metadata from MLVs (number of frames and total file size). See also this Python script, as documentation.

Caveat: probably won't work out of the box with the latest builds, but you can still extract some code snippets from there.

For dark frame, it might be interesting to close the shutter and possibly move the mirror, in the same way Canon firmware does for phase-detect autofocus in LiveView. Had a couple of attempts in this direction, but didn't know what I was doing; might be worth a second try. If that could work, you will be able to fully automate the dark frame capture.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #406 on: April 10, 2018, 05:43:21 PM »
Thanks, yes, checked that script in particular. Will start to poke from there. Maybe something which could lead to a ML Lua API module called mlv. Only ideas atm. Still early in the lua game...

Quote
For dark frame, it might be interesting to close the shutter and possibly move the mirror, in the same way Canon firmware does for phase-detect autofocus in LiveView. Had a couple of attempts in this direction, but didn't know what I was doing; might be worth a second try. If that could work, you will be able to fully automate the dark frame capture.
Oh yes!

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #407 on: April 11, 2018, 08:18:07 AM »
Another idea here would be to have mlv_lite produce maybe a xmp file with actual settings when recording a mlv. Lua would pick up info from a file easier then bytewise from the actual mlv itself?
Another thought is to produce a lua script in post with the help of bash which iterates all mlv files on card and produces a lua script with all camera settings it can pick up from the mlv files. Then back to cam for recording.
Quite some possibilities here...

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #408 on: April 11, 2018, 09:34:20 AM »
Trying this on my eosm with crop_rec_4k branch:
Code: [Select]
menu.close()
console.show()
camera.shutter.value = 1/50
camera.iso.value=800
menu.set("Movie", "FPS override", "ON")
menu.set("RAW video", "Resolution", 1736)
menu.set("Sound recording", "Enable sound", "OFF")
movie.start()
msleep(2000)
movie.stop()
Two problems. menu.set("Movie", "FPS override", "ON") doesn´t turn on in console it says "Could not set value ON for menu movie FPS override"
The other one is that movie.stop() doesn´t seem to work with raw recording but works with H.264 recording so raw just continues until it stops by itself.
Is it possible to change FPS override to for instance:
Code: [Select]
menu.set("Movie", "FPS override", "24.002000"")

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: Lua Scripting (lua.mo)
« Reply #409 on: April 11, 2018, 09:42:38 AM »
When you turn on FPS override, the value displayed in the menu is not "ON" - it's the actual frame rate. Try setting it to 1 (numeric value, meaning the internal state of that menu entry).

To change the override value, try:
Code: [Select]
menu.set("FPS override", "Desired FPS", "23.976")

Changing menu items by string works by toggling the option many times, until reaching the desired string (or prefix). A bit error-prone and sometimes slow, but seems to handle custom logic in many cases (but there are still rough edges).

Will check movie start/stop later; I'd expect it to work, but...

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #410 on: April 11, 2018, 10:26:48 AM »
Some testing:
Code: [Select]
menu.set("FPS override", "Desired FPS", "24.002")gave me a result of 16.003 fps.
Tested also:
Code: [Select]
menu.set("FPS override", "Desired FPS", "24") and think it resulted in 2 fps

Should this work to set FPS override to ON?
Code: [Select]
menu.set("Movie", "FPS override", "1")If so, did not work.

Maybe this will work:
Code: [Select]
menu.set("FPS override", "Actual FPS", "24") Nope...

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #411 on: April 13, 2018, 02:34:00 PM »
Tried on my 100D and it does seem to work with:
Code: [Select]
movie.stop() There´s some delay added to the stop so I wrongly assumed it wasn´t stopping from script when running it on my eosm.

FPS override is still something left out there not working. "Desired FPS" is a loose canon... 8)
Maybe has something todo with this. If anyone has a tip here please share:
Quote
Changing menu items by string works by toggling the option many times, until reaching the desired string (or prefix). A bit error-prone and sometimes slow, but seems to handle custom logic in many cases (but there are still rough edges).
Does it mean moving directly to desired fps is causing the issue? So moving/scrolling to desired fps step by step will be better?(guessing...)

It seems timing with key.press is more accurate than using movie.stop():
Code: [Select]
-- Movie start

menu.close()

camera.shutter.value = 1/50
camera.iso.value=800
menu.set("RAW video", "Resolution", 1736)
menu.set("Sound recording", "Enable sound", "OFF")
key.press(KEY.REC)
msleep(4000)
key.press(KEY.REC)

stan101

  • New to the forum
  • *
  • Posts: 12
Re: Lua Scripting (lua.mo)
« Reply #412 on: April 15, 2018, 10:18:59 AM »
Canon 70D version magiclantern-lua_fix.2018Mar31.70D112.zip

Memory Benchmark:
mode: play-ph lcd, global draw on
Display on 72.24 mb/s
Display off 72.39 mb/s
memcpy cacheable

This often went as high as low 80's with a only a difference of less than 1 mb. On one occasion I ran it and the display off was marginally slower.

Lua Test
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-4-15 14:59:15
===============================================================================

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 = 32
    apex = 3.
    value = 2.8
    min = table:
      raw = 21
      apex = 1.625
      value = 1.7
    max = table:
      raw = 72
      apex = 8.
      value = 16
  iso = table:
    raw = 104
    apex = 9.
    value = 1600
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 8
    value = 1.
  kelvin = 5300
  mode = 3
  metering_mode = 3
  drive_mode = 19
  model = "Canon EOS 70D"
  model_short = "70D"
  firmware = "1.1.2"
  temperature = 172
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  bulb = function: p
  reboot = function: p
  shoot = 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:
  clear = function: p
  show = function: p
  write = 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
  wait = function: p
  info = function: p
  resume = function: p
lens = table:
  name = "18-35mm"
  focal_length = 35
  focus_distance = 820
  hyperfocal = 23096
  dof_near = 796
  dof_far = 845
  af = true
  af_mode = 0
  focus = function: p
  autofocus = function: p
display = table:
  idle = nil
  height = 480
  width = 720
  clear = function: p
  notify_box = function: p
  off = function: p
  circle = function: p
  rect = function: p
  load = function: p
  screenshot = function: p
  pixel = function: p
  draw = function: p
  line = function: p
  print = function: p
  on = function: p
key = table:
  last = 10
  wait = function: p
  press = function: p
menu = table:
  visible = false
  get = function: p
  close = function: p
  open = function: p
  set = function: p
  new = function: p
  block = function: p
  select = function: p
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 91
  ms_clock = 91742
  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 = 7381
    folder_number = 100
    free_space = 7715808
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 7381
    folder_number = 100
    free_space = 7715808
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  date = table:
    min = 59
    sec = 16
    wday = 1
    year = 2018
    yday = 105
    day = 15
    isdst = false
    hour = 14
    month = 4
  rename = function: p
  remove = function: p
  call = function: p
  directory = function: p
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: p
battery = table:
  level = 72
  id = 1
  performance = 3
  time = nil
  drain_rate = 30
task = 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 MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Stop LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Start LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Start LiveView...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
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_7382.CR2 not found.
B:/DCIM/100CANON/IMG_7382.JPG not found.

Stub Test
Code: [Select]
[Pass] is_play_mode() => 0x1
[INFO] Camera model: Canon EOS 70D 1.1.2 (0x80000325 70D)
[Pass] is_camera("DIGIC", "*") => 0x1
[Pass] is_camera(__camera_model_short, firmware_version) => 0x1
[Pass] src = fio_malloc(size) => 0x4212009c
[Pass] dst = fio_malloc(size) => 0x429240a8
[Pass] memcmp(dst, src, 4097) => 0x4
[Pass] edmac_memcpy(dst, src, 4097) => 0x429240a8
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x429240a8
[Pass] memcmp(dst, src, size) => 0x53
[Pass] edmac_memcpy(dst, src, size) => 0x429240a8
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0xffffffd2
[Pass] edmac_memcpy_start(dst, src, size) => 0x429240a8
       dt => 0x18d4
[Pass] copied => 0x4170d8
[Pass] copied => 0x4170d8
[Pass] copied => 0x4170d8
[Pass] memcmp(dst, src, copied) => 0x0
[Pass] memcmp(dst, src, copied + 16) => 0xffffffef
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0x8cea90
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x149e
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0xe9
[Pass] tries[1] => 0x10d
[Pass] tries[2] => 0xf3
[Pass] tries[3] => 0xff
[Pass] failr[0] => 0x66
[Pass] failw[0] => 0xb2
[Pass] failr[1] => 0x6a
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[Pass] failw[2] => 0xcc
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x26
       times[1] / tries[1] => 0x26
       times[2] / tries[2] => 0x26
       times[3] / tries[3] => 0x25
Cache tests finished.

[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x1
[Pass] lv_focus_status => 0x3
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] wait_focus_status(1000, 3) => 0x0
[FAIL] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] wait_focus_status(1000, 3) => 0x0
[FAIL] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] wait_focus_status(1000, 3) => 0x0
[FAIL] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[FAIL] wait_focus_status(1000, 3) => 0x0
[FAIL] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] wait_focus_status(1000, 3) => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x2
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x2
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x2
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x2
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x2
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x1
[Pass] get_focus_confirmation() => 0x0
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] lv_focus_status => 0x1
[Pass] f = FIO_CreateFile("test.dat") => 0x5
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x4092f734
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x5
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x4212009c
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x5
[Pass] FIO_SeekSkipFile(f, 0, SEEK_END) => 0x82000000
[Pass] FIO_WriteFile(f, buf, 0x10) => 0x10
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0x81fffff0
[Pass] FIO_WriteFile(f, buf, 0x30) => 0x30
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000020
[Pass] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xdebe
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x8
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0xdf1e
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x38b86
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0xe1
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0xc8
[Pass] ABS((get_us_clock() - t0) - 110000) => 0x22a
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x38b88
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0x2a6
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0x28c
[Pass] ABS((get_us_clock() - t0) - 310000) => 0x239
       t0 = GET_DIGIC_TIMER() => 0x5d780
       msleep(250)
       t1 = GET_DIGIC_TIMER() => 0x99b19
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x4
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x33
       Date/time: 2018/04/15 14:14:51
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x35
[Pass] MOD(s1-s0, 60) => 0x2
[Pass] MOD(s1-s0, 60) => 0x2
       m0 = MALLOC_FREE_MEMORY => 0x4c6c0
[Pass] p = (void*)_malloc(50*1024) => 0x112490
[Pass] CACHEABLE(p) => 0x112490
       m1 = MALLOC_FREE_MEMORY => 0x3feb0
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x4c6c0
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x242724
[Pass] p = (void*)_AllocateMemory(128*1024) => 0x92f6f4
[Pass] CACHEABLE(p) => 0x92f6f4
       m1 = GetFreeMemForAllocateMemory() => 0x222718
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x242724
[Pass] ABS((m0-m1) - 128*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x4c6c0
       m02 = GetFreeMemForAllocateMemory() => 0x242724
[Pass] p = (void*)_alloc_dma_memory(128*1024) => 0x4092f734
[Pass] UNCACHEABLE(p) => 0x4092f734
[Pass] CACHEABLE(p) => 0x92f734
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x4092f734
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(16*1024*1024) => 0x4212008c
[Pass] UNCACHEABLE(p) => 0x4212008c
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x4c6c0
       m12 = GetFreeMemForAllocateMemory() => 0x242784
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x60
[Pass] suite = shoot_malloc_suite_contig(16*1024*1024) => 0xff700
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x1123d0
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42120088
[Pass] UNCACHEABLE(p) => 0x42120088
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0xff700
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x2000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x112238
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       largest_shoot_block = suite->size => 0x2000000
[INFO] largest_shoot_block: 32MB
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(largest_shoot_block + 1024*1024) => 0xff700
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x2
[Pass] suite->size => 0x2100000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x112238
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112308
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2100000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4410407c
[Pass] UNCACHEABLE(p) => 0x4410407c
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x2100000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0xff700
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x14
[Pass] suite->size => 0xf700000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x112238
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42104070
[Pass] UNCACHEABLE(p) => 0x42104070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112308
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x220c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4410407c
[Pass] UNCACHEABLE(p) => 0x4410407c
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112340
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x22f4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x581140e4
[Pass] UNCACHEABLE(p) => 0x581140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112378
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x23dc000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4af140e4
[Pass] UNCACHEABLE(p) => 0x4af140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1123b0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x24c4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x48b140e4
[Pass] UNCACHEABLE(p) => 0x48b140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1123e8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x25ac000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x467140e4
[Pass] UNCACHEABLE(p) => 0x467140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112490
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2694000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5c9140e4
[Pass] UNCACHEABLE(p) => 0x5c9140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1124c8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x277c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a5140e4
[Pass] UNCACHEABLE(p) => 0x5a5140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112500
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2864000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x443140e4
[Pass] UNCACHEABLE(p) => 0x443140e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112538
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4864000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x58200064
[Pass] UNCACHEABLE(p) => 0x58200064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112570
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4b78000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a200070
[Pass] UNCACHEABLE(p) => 0x5a200070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1125a8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x6b78000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a600064
[Pass] UNCACHEABLE(p) => 0x5a600064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1125e0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x6e8c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5c600070
[Pass] UNCACHEABLE(p) => 0x5c600070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112618
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x8e8c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x44400064
[Pass] UNCACHEABLE(p) => 0x44400064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112650
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x91a0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46400070
[Pass] UNCACHEABLE(p) => 0x46400070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112688
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb1a0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46800064
[Pass] UNCACHEABLE(p) => 0x46800064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1126c0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb4b4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x48800070
[Pass] UNCACHEABLE(p) => 0x48800070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x1126f8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xd4b4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x48c00064
[Pass] UNCACHEABLE(p) => 0x48c00064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112730
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xd7c8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4ac00070
[Pass] UNCACHEABLE(p) => 0x4ac00070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x112768
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xf700000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x55e00064
[Pass] UNCACHEABLE(p) => 0x55e00064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0xf700000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x21a324
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x21a300
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x21a2e0
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[Pass] bar => '****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0xe09800ee
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[Pass] get_task_name_from_id(current_task->taskId) => 'run_test'
[Pass] task_max => 0x84
[Pass] task_max => 0x84
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0xe09a00c8
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0xe09c026e
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0xe09e00c6
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[Pass] display_idle() => 0x1
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[Pass] HALFSHUTTER_PRESSED => 0x1
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x1
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x1
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
=========================================================
Test complete, 12814 passed, 8 failed.
.

Stack focusing is working well.. I trialed it a few times. I will get and and shoot with this version tomorrow and see if anything comes of it and report back.




stan101

  • New to the forum
  • *
  • Posts: 12
Re: Lua Scripting (lua.mo)
« Reply #413 on: April 15, 2018, 10:36:52 AM »
For people who are not au fait with this type of testing as I wasn't, here are some further details on how to set up the tests for the 70D. It may be the same for other cameras:

1. Enter Magic Lantern by hitting delete then click any button.
2. Use the left or right direction button to scroll across to the "Modules" tab, The icon is four squares with the top right square out of place.
3. Turn on "bench", "lua", and "selftest" by scrolling to them individually and hit the 'set" button.
4. Restart the camera.
5. After restart re-enter Magic Lantern by hitting delete then click any button.
6. Scroll across to "Scripts". It is one tab to the left of "Modules."
7. Run "Script API Tests". You may be asked to change to manual mode on the camera. Check the screen for info. After it is complete, Restart your camera to clear the screen.
8. Scroll across to "Debug". It is two tabs  to the right of "Scripts."
9. Scroll down and enter "Benchmarks" then scroll down to "Memory Benchmarks" and run it. After it finishes take a photo of the results or somehow record them. After it is complete, Restart your camera to clear the screen.
10.  After restart re-enter Magic Lantern by hitting delete then click any button.
11. Scroll down to "Self Tests" and enter it. At the top will be "Stubs API Test". Run it. You may be asked to change to movie mode. Do so.
12. After it completes that test, shut down the camera and reamove the memory card.
13. Navigate into the memory on a PC and find "LUATEST.LOG" in the root directory of the card.
14.Navigate to ML\Logs folder and find "Stubtest.log."
15. Put the info into a post here.

saulbass

  • Freshman
  • **
  • Posts: 85
Re: Lua Scripting (lua.mo)
« Reply #414 on: May 02, 2018, 09:33:43 PM »
not sure if this is possible - but would be useful to have a lua scripted beep command so that when the script is waiting for user input - the camera bleeps - saves having to watch the camera on long script runs.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3715
Re: Lua Scripting (lua.mo)
« Reply #415 on: May 07, 2018, 05:35:23 AM »
Here's a recurring nightmare. In all cases the api_test.lua script would stop on the ISO test and show this error:

650D


600D


1100D (in QEMU)


However, the exposure tests pass fine as long as it is either run by it self or, as @mk11174 pointed out, rearranged so that it runs before the IO tests.

Looks like maybe a memory leak or something that is way beyond my comprehension.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Lua Scripting (lua.mo)
« Reply #416 on: May 07, 2018, 02:48:26 PM »

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #417 on: May 25, 2018, 04:29:09 PM »
I´m trying to check if movie mode is set or not via a lua script and if not tell me to set i to movie mode:

Based on this idea:
Code: [Select]
while camera.mode == MODE.MOVIE
do
display.notify_box("Set camera to MOVIE mode")
msleep(1000)
end

I am thinking it could be possible to put in a "not" in the mix but this isn´t working:
Code: [Select]
while not camera.mode == MODE.MOVIE
do
display.notify_box("Set camera to MOVIE mode")
msleep(1000)
end

Code: [Select]
camera.mode == MODE.PHOTOisn´t legit either so how to go on here? David, Garry, A1ex, somenone else?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: Lua Scripting (lua.mo)
« Reply #418 on: May 25, 2018, 04:47:22 PM »
Maybe it doesn't like the indentation?

Ah, wait, it's not Python. Here you go. Or here.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #419 on: May 25, 2018, 05:07:41 PM »
Indentation can always improve  :P
Anyway, will check some more from the links tonight.
Thanks!

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #420 on: May 25, 2018, 10:42:27 PM »
Lovely stuff. Lua, so very useful:
Code: [Select]
while camera.mode ~= MODE.MOVIE
do
display.notify_box("Set camera to MOVIE mode")
msleep(1000)
end

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #421 on: June 01, 2018, 03:18:25 PM »
Been tinkering with two preset scripts with the intention to fast get into a basic movie mode either in 5xzoom or when in regular 1080p mode. All in all most settings are being applied as expected but there are two things that I cannot seem to get right yet. Here are both scripts in question:

preset 1
Code: [Select]
-- 10bit_5x_iso100_2.5k

menu.set("Overlay", "Global Draw", "OFF")
console.hide()
menu.close()
while camera.mode ~= MODE.MOVIE do
   display.notify_box("enable MOVIE mode")
   msleep(1000)
end

    menu.set("Sound recording", "Enable sound", "ON")
while menu.get("Sound recording", "Enable sound", "") ~= "ON" do
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
end
 
    lv.zoom = 5
    menu.set("Overlay", "Zebras", "OFF")
    menu.set("Overlay", "Magic Zoom", "OFF")
    menu.set("Overlay", "Cropmarks", "OFF")
    menu.set("Overlay", "Spotmeter", "OFF")
    menu.set("Overlay", "False color", "OFF")
    menu.set("Overlay", "Histogram", "OFF")
    menu.set("Overlay", "Waveform", "OFF")
    menu.set("Overlay", "Vectorscope", "OFF")
    menu.set("Display", "Clear overlays", "OFF")

    menu.set("Movie", "RAW video", "ON")
    menu.set("RAW video", "Resolution", 2560)
    menu.set("RAW video", "Data format", "10-bit lossless")
    menu.set("RAW video", "Preview", "Real-time")
    camera.shutter.value = 1/50
    camera.iso.value=100
    menu.close()

if menu.get("FPS override", "Actual FPS", "") >= "24.999" then
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
end

    menu.set("Overlay", "Global Draw", "LiveView")

preset 2
Code: [Select]
-- 12bit_iso100_1080p

menu.set("Overlay", "Global Draw", "OFF")
console.hide()
menu.close()
while camera.mode ~= MODE.MOVIE do
   display.notify_box("enable MOVIE mode")
   msleep(1000)
end

    menu.set("Sound recording", "Enable sound", "ON")
while menu.get("Sound recording", "Enable sound", "") ~= "ON" do
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
end

    lv.zoom = 1
    menu.set("Overlay", "Focus Peak", "OFF")
    menu.set("Overlay", "Zebras", "OFF")
    menu.set("Overlay", "Magic Zoom", "F+HS, Med, TL, 2:1")
    menu.set("Overlay", "Cropmarks", "OFF")
    menu.set("Overlay", "Spotmeter", "OFF")
    menu.set("Overlay", "False color", "OFF")
    menu.set("Overlay", "Histogram", "OFF")
    menu.set("Overlay", "Waveform", "OFF")
    menu.set("Overlay", "Vectorscope", "OFF")
    menu.set("Display", "Clear overlays", "OFF")
    menu.set("Overlay", "Global Draw", "LiveView")

    menu.set("Movie", "RAW video", "ON")
    menu.set("RAW video", "Resolution", 1920)
    menu.set("RAW video", "Data format", "12-bit lossless")
    menu.set("RAW video", "Preview", "Auto")
    camera.shutter.value = 1/50
    camera.iso.value=100
    menu.close()

About magic zoom:
In preset 2 I set magic zoom mode accordingly:
Code: [Select]
    menu.set("Overlay", "Magic Zoom", "F+HS, Med, TL, 2:1")This works good but I really like to set magic zoom to this instead:
Code: [Select]
    menu.set("Overlay", "Magic Zoom", "HalfS, Med, TL, 2:1")This won´t apply. Seems default underlaying mode is F+HS, Med, TL, 2:1 and getting the Halfshutter option added will not apply.
I then do following to get the halfshutter setting applied but still not working:
Code: [Select]
    menu.set("Overlay", "Magic Zoom", "Trigger mode", "HalfShutter")To my logic this should do the trick? Ideas?

About FPS override:
FPS override is really picky. If you don´t specify exactly what´s going on after specifying Desired fps it will punish the user with complete randomness:
Working example:
Code: [Select]
    menu.set("FPS override", "Desired FPS", "24 (from 30)")But only if (from 30) part is specified and correctly added.
If doing line below this you get around 16 fps instead of 24fps:
Code: [Select]
    menu.set("FPS override", "Desired FPS", "24)

If working with the eosm one have to something like this to find out the actual fps and add accordingly to get a correct 24fps via lua(very crude example):
 
Code: [Select]
   if menu.get("FPS override", "Actual FPS", "29.973") == "29.973"
    then
    menu.set("FPS override", "Desired FPS", "24 (from 30)")
    end
    if menu.get("FPS override", "Actual FPS", "29.975") == "29.975"
    then
    menu.set("FPS override", "Desired FPS", "24 (from 30)")
    end
    if menu.get("FPS override", "Actual FPS", "29.958") == "29.958"
    then
    menu.set("FPS override", "Desired FPS", "24 (from 30)")
    end

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3715
Re: Lua Scripting (lua.mo)
« Reply #422 on: June 01, 2018, 10:44:28 PM »
Experimented around with Danne's latest lua scripts and they work though what also works is copying a settings folder with all the settings needed to set the desired bit depth, which modules to turn on, etc. and copying this settings folder onto each card. Maybe a lua script that can create the desired settings and maybe even restart ML to get the modules loaded might be another way to get all these settings in order? Maybe a combination of the two techniques?

This is what is in my settings folder:

Code: [Select]
LUA.EN
MLV_LITE.EN
MLV_SND.EN
SD_UHS.EN
SDOVER~1.LEN

MLV_LITE.CFG
Code: [Select]
# Config file for module mlv_lite (MLV_LITE.MO)

raw.video.enabled = 1

raw.res_x = 6

raw.write.speed = 5195

raw.preview = 1

raw.output_format = 7


MAGIC.CFG
Code: [Select]
# Magic Lantern Nightly.2018Jun01.700D115 (f938717fc0f1 (crop_rec_4k_mlv_lite_snd_sd_uhs_HDR_ext_all_bits) tip)
# Built on 2018-06-01 11:39:01 UTC by dan@dans-MBP
# Configuration saved on 2018/06/01 19:08:45
beta.warn = 1

menu.first = -2

fps.preset = 1

fps.override.idx = 32

fps.override = 1

hist.draw = 0

spotmeter.draw = 0

zebra.draw = 0

global.draw = 1


There's also a MENU.CFG though that might not be essential to getting these settings working?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #423 on: June 04, 2018, 05:03:38 PM »
I have put up my recent lua scripts here:

lua_magic
https://bitbucket.org/Dannephoto/lua_magic/

Found a way to enable FPS override from lua hopefully getting correct Desired fps. Since menu.set needs more info than just fps number we need some checking before applying:
Code: [Select]
-- warn if in mv720p
if menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "61" then
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   return
end

-- workaround by range check to be able to set FPS override numbers
if menu.get("FPS override", "Actual FPS", "") >= "23" and menu.get("FPS override", "Actual FPS", "") <= "24" then
   menu.set("FPS override", "Desired FPS", "24 (from 24)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "25" and menu.get("FPS override", "Actual FPS", "") <= "26" then
   menu.set("FPS override", "Desired FPS", "24 (from 25)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "29" and menu.get("FPS override", "Actual FPS", "") <= "30" then
   menu.set("FPS override", "Desired FPS", "24 (from 30)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "51" then
   menu.set("FPS override", "Desired FPS", "24 (from 50)")
   camera.shutter.value = 1/60
elseif menu.get("FPS override", "Actual FPS", "") >= "59" and menu.get("FPS override", "Actual FPS", "") <= "60" then
   menu.set("FPS override", "Desired FPS", "24 (from 60)")
   camera.shutter.value = 1/60
end

-- let´s go into zoom mode
   lv.zoom = 5

Couldn´t enable FPS override any other way the working with menu.select and key.press. Glad that worked at least. Cool stuff.
Code: [Select]
-- now turn FPS override to on
   menu.select("Movie", "FPS override")
   menu.open()     -- open ML menu
   key.press(KEY.SET)
   menu.close()

Full script here:
Code: [Select]
-- 5x_2.5k_10bit_iso100_24fps

-- warn if not movie mode
   menu.set("Overlay", "Global Draw", "OFF")
   console.hide()
   menu.close()
while camera.mode ~= MODE.MOVIE do
   display.notify_box("enable MOVIE mode")
   msleep(1000)
end

-- set regular live view and turn FPS override OFF
   lv.zoom = 1
   menu.set("Movie", "FPS override", "OFF")
   msleep(400)

-- enable sound
   menu.set("Sound recording", "Enable sound", "ON")
if menu.get("Sound recording", "Enable sound", "") ~= "ON" then
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
   return
end

-- warn if in mv720p
if menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "61" then
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   return
end

-- workaround by range check to be able to set FPS override numbers
if menu.get("FPS override", "Actual FPS", "") >= "23" and menu.get("FPS override", "Actual FPS", "") <= "24" then
   menu.set("FPS override", "Desired FPS", "24 (from 24)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "25" and menu.get("FPS override", "Actual FPS", "") <= "26" then
   menu.set("FPS override", "Desired FPS", "24 (from 25)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "29" and menu.get("FPS override", "Actual FPS", "") <= "30" then
   menu.set("FPS override", "Desired FPS", "24 (from 30)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "51" then
   menu.set("FPS override", "Desired FPS", "24 (from 50)")
   camera.shutter.value = 1/60
elseif menu.get("FPS override", "Actual FPS", "") >= "59" and menu.get("FPS override", "Actual FPS", "") <= "60" then
   menu.set("FPS override", "Desired FPS", "24 (from 60)")
   camera.shutter.value = 1/60
end

-- let´s go into zoom mode
   lv.zoom = 5

-- now turn FPS override to on
   menu.select("Movie", "FPS override")
   menu.open()     -- open ML menu
   key.press(KEY.SET)
   menu.close()

-- Overlay
   menu.set("Overlay", "Zebras", "OFF")
   menu.set("Overlay", "Magic Zoom", "OFF")
   menu.set("Overlay", "Cropmarks", "OFF")
   menu.set("Overlay", "Spotmeter", "OFF")
   menu.set("Overlay", "False color", "OFF")
   menu.set("Overlay", "Histogram", "OFF")
   menu.set("Overlay", "Waveform", "OFF")
   menu.set("Overlay", "Vectorscope", "OFF")
   menu.set("Display", "Clear overlays", "OFF")

-- Movie
   menu.set("Movie", "RAW video", "ON")
   menu.set("Movie", "HDR video", "OFF")
   menu.set("RAW video", "Resolution", 2560)
   menu.set("RAW video", "Data format", "10-bit lossless")
   menu.set("RAW video", "Preview", "Real-time")
   camera.iso.value=100
   menu.close()

-- warn if FPS override still is wrongly set
if menu.get("FPS override", "Actual FPS", "") >= "24.999" then
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
end

-- done, turn on global draw
   menu.set("Overlay", "Global Draw", "LiveView")

-- go back to menu origin
   menu.select("Scripts")




Another issue in getting into Magic Zoom settings but this seems to do the trick to get what we want:
Code: [Select]
-- magic zoom quite stubborn one to set(two step operation)
   menu.set("Magic Zoom", "Trigger mode", "HalfShutter")
   menu.set("Overlay", "Magic Zoom", "HalfS, Med, TL, 2:1")

Full script:
Code: [Select]
-- mv1080p_12bit_iso100_24fps

-- warn if not movie mode
   menu.set("Overlay", "Global Draw", "OFF")
   console.hide()
   menu.close()
while camera.mode ~= MODE.MOVIE do
   display.notify_box("enable MOVIE mode")
   msleep(1000)
end

-- set regular live view and turn FPS override OFF
   lv.zoom = 1
   menu.set("Movie", "FPS override", "OFF")
   msleep(400)

-- enable sound
   menu.set("Sound recording", "Enable sound", "ON")
if menu.get("Sound recording", "Enable sound", "") ~= "ON" then
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
   display.notify_box("enable mlv_snd.mo and restart to record sound")
   msleep(1000)
   return
end

-- warn if in mv720p
if menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "61" then
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   display.notify_box("Set cam to mv1080p and run script again")
   msleep(1000)
   return
end

-- workaround by range check to be able to set FPS override numbers
if menu.get("FPS override", "Actual FPS", "") >= "23" and menu.get("FPS override", "Actual FPS", "") <= "24" then
   menu.set("FPS override", "Desired FPS", "24 (from 24)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "25" and menu.get("FPS override", "Actual FPS", "") <= "26" then
   menu.set("FPS override", "Desired FPS", "24 (from 25)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "29" and menu.get("FPS override", "Actual FPS", "") <= "30" then
   menu.set("FPS override", "Desired FPS", "24 (from 30)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "51" then
   menu.set("FPS override", "Desired FPS", "24 (from 50)")
   camera.shutter.value = 1/60
elseif menu.get("FPS override", "Actual FPS", "") >= "59" and menu.get("FPS override", "Actual FPS", "") <= "60" then
   menu.set("FPS override", "Desired FPS", "24 (from 60)")
   camera.shutter.value = 1/60
end

-- now turn FPS override to on
   menu.select("Movie", "FPS override")
   menu.open()     -- open ML menu
   key.press(KEY.SET)
   menu.close()

-- Overlay
    menu.set("Overlay", "Focus Peak", "OFF")
    menu.set("Overlay", "Zebras", "OFF")

-- magic zoom quite stubborn one to set(two step operation)
   menu.set("Magic Zoom", "Trigger mode", "HalfShutter")
   menu.set("Overlay", "Magic Zoom", "HalfS, Med, TL, 2:1")

   menu.set("Overlay", "Cropmarks", "OFF")
   menu.set("Overlay", "Spotmeter", "OFF")
   menu.set("Overlay", "False color", "OFF")
   menu.set("Overlay", "Histogram", "OFF")
   menu.set("Overlay", "Waveform", "OFF")
   menu.set("Overlay", "Vectorscope", "OFF")
   menu.set("Display", "Clear overlays", "OFF")

-- Movie
   menu.set("Movie", "RAW video", "ON")
   menu.set("Movie", "HDR video", "OFF")
   menu.set("RAW video", "Resolution", 1920)
   menu.set("RAW video", "Data format", "12-bit lossless")
   menu.set("RAW video", "Preview", "Auto")
   camera.iso.value=100
   menu.close()

-- warn if FPS override still is wrongly set
if menu.get("FPS override", "Actual FPS", "") >= "24.999" then
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
   display.notify_box("Set FPS override to 24 or you´re in deep shit.")
   msleep(1000)
end

-- done, turn on global draw
   menu.set("Overlay", "Global Draw", "LiveView")

-- go back to menu origin
   menu.select("Scripts")


Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5639
Re: Lua Scripting (lua.mo)
« Reply #424 on: June 05, 2018, 12:54:48 PM »
Interesting workaround to get correct FPS override number. If you set Desired fps higher then original fps running the script will give random low fps in this case aiming for 24. Going from lower let´s say 16 to 24 fps will give correct numbers. Solution is to rerun lua script one more time to correct for the first issue:
Code: [Select]
-- workaround. May need an extra pass(if higher fps than actual)
while menu.get("FPS override", "Actual FPS", "") <= "23" or menu.get("FPS override", "Actual FPS", "") >= "25" or menu.get("Movie", "FPS override", "") == "OFF" do
   menu.set("Movie", "FPS override", "OFF")
   msleep(1000)

if menu.get("FPS override", "Actual FPS", "") >= "23" and menu.get("FPS override", "Actual FPS", "") <= "24" then
   menu.set("FPS override", "Desired FPS", "24 (from 24)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "25" and menu.get("FPS override", "Actual FPS", "") <= "26" then
   menu.set("FPS override", "Desired FPS", "24 (from 25)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "29" and menu.get("FPS override", "Actual FPS", "") <= "30" then
   menu.set("FPS override", "Desired FPS", "24 (from 30)")
   camera.shutter.value = 1/50
elseif menu.get("FPS override", "Actual FPS", "") >= "49" and menu.get("FPS override", "Actual FPS", "") <= "51" then
   menu.set("FPS override", "Desired FPS", "24 (from 50)")
   camera.shutter.value = 1/60
elseif menu.get("FPS override", "Actual FPS", "") >= "59" and menu.get("FPS override", "Actual FPS", "") <= "60" then
   menu.set("FPS override", "Desired FPS", "24 (from 60)")
   camera.shutter.value = 1/60
end

-- now turn FPS override to on
   menu.select("Movie", "FPS override")
   menu.open()     -- open ML menu
   key.press(KEY.SET)
   menu.close()
end