Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aprofiti

Pages: [1] 2 3 ... 8
1
Camera-specific discussion / Re: [UNMAINTAINED] Canon 40D
« on: September 07, 2019, 04:51:00 PM »
Thanks for checking. Need to figure out somehow to solve the issue, I'll try to have a look again

2
Camera-specific discussion / Re: [UNMAINTAINED] Canon 40D
« on: September 06, 2019, 06:12:54 PM »
@heder Can you load modules?
Make sure module_task is launched from ml_big_init_task() inside custom init.c

I get wrong behaviour with 5DC, they are listed with wrong filename (it show only last 4 characters of the module's name) so can't be found on card.
Would like to know if it’s the same with 40D.

3
Canon 5DC to compare with other vxworks cameras:
Code: [Select]
  Magic Lantern Rescue
 ----------------------------
 - Model ID: 0x0 ERROR
 - Camera model: ???
 - Firmware version: ??? / ???
 - IMG naming: 100?????/????0000.JPG
 - User PS: ??? ??? ???
 - Boot flags: FIR=0 BOOT=-1 RAM=-1 UPD=-1
 - ROMBASEADDR: 0xFF810000

CHDK CPU info for 0x0 ERROR
------------------------------
ID         0x41059461
  Revision             0x1 1
  Part                 0x946 2374
  ARM Arch             0x5 5
  Variant              0x0 0
  Implementor          0x41 65
Cache type 0x0F112112
  Icache words/line    0x2 2 [8]
  Icache absent        0x0 0
  Icache assoc         0x2 2
  Icache size          0x4 4 [8K]
  Reserved0_2          0x0 0
  Dcache words/line    0x2 2 [8]
  Dcache absent        0x0 0
  Dcache assoc         0x2 2
  Dcache size          0x4 4 [8K]
  Reserved1_2          0x0 0
  Harvard/unified      0x1 1
  Cache type           0x7 7
  Reserved2_3          0x0 0
TCM type   0x000C00C0
  Reserved0_2          0x0 0
  ITCM absent          0x0 0
  Reserved1_3          0x0 0
  ITCM size            0x3 3 [4K]
  Reserved2_4          0x0 0
  DTCM absent          0x0 0
  Reserved3_2          0x0 0
  DTCM size            0x3 3 [4K]
  Reserved4_10         0x0 0
Control    0x0005107D
  Protect enable       0x1 1
  Reserved0_1          0x0 0
  Dcache enable        0x1 1
  Reserved1_4          0xF 15
  Big endian           0x0 0
  Reserved2_4          0x0 0
  Icache enable        0x1 1
  Alt vector           0x0 0
  Cache RRR            0x0 0
  Disble load TBIT     0x0 0
  DTCM enable          0x1 1
  DTCM mode            0x0 0
  ITCM enable          0x1 1
  ITCM mode            0x0 0
  Reserved3_12         0x0 0
Protection Region 0 0x0000003F
  Enable               0x1 1
  Size                 0x1F 31 [4G]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]
Protection Region 1 0x0000003B
  Enable               0x1 1
  Size                 0x1D 29 [1G]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]
Protection Region 2 0xF8000035
  Enable               0x1 1
  Size                 0x1A 26 [128M]
  Undef0_7             0x0 0
  Base                 0x7C000 507904 [0xF8000000]
Protection Region 3 0xC0000039
  Enable               0x1 1
  Size                 0x1C 28 [512M]
  Undef0_7             0x0 0
  Base                 0x60000 393216 [0xC0000000]
Protection Region 4 0xFF80002D
  Enable               0x1 1
  Size                 0x16 22 [8M]
  Undef0_7             0x0 0
  Base                 0x7FC00 523264 [0xFF800000]
Protection Region 5 0x00000035
  Enable               0x1 1
  Size                 0x1A 26 [128M]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]
Protection Region 6 0x00000000
  Enable               0x0 0
  Size                 0x0 0 [invalid]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]
Protection Region 7 0x00000000
  Enable               0x0 0
  Size                 0x0 0 [invalid]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]
Region data perms 0x00333333
  Region 0             0x3 3 [P:RW U:RW]
  Region 1             0x3 3 [P:RW U:RW]
  Region 2             0x3 3 [P:RW U:RW]
  Region 3             0x3 3 [P:RW U:RW]
  Region 4             0x3 3 [P:RW U:RW]
  Region 5             0x3 3 [P:RW U:RW]
  Region 6             0x0 0 [P:-- U:--]
  Region 7             0x0 0 [P:-- U:--]
Region inst perms 0x00333333
  Region 0             0x3 3 [P:RW U:RW]
  Region 1             0x3 3 [P:RW U:RW]
  Region 2             0x3 3 [P:RW U:RW]
  Region 3             0x3 3 [P:RW U:RW]
  Region 4             0x3 3 [P:RW U:RW]
  Region 5             0x3 3 [P:RW U:RW]
  Region 6             0x0 0 [P:-- U:--]
  Region 7             0x0 0 [P:-- U:--]
DCache cfg 0x00000030
  Region 0             0x0 0
  Region 1             0x0 0
  Region 2             0x0 0
  Region 3             0x0 0
  Region 4             0x1 1
  Region 5             0x1 1
  Region 6             0x0 0
  Region 7             0x0 0
ICache cfg 0x00000030
  Region 0             0x0 0
  Region 1             0x0 0
  Region 2             0x0 0
  Region 3             0x0 0
  Region 4             0x1 1
  Region 5             0x1 1
  Region 6             0x0 0
  Region 7             0x0 0
Write buffer 0x00000030
  Region 0             0x0 0
  Region 1             0x0 0
  Region 2             0x0 0
  Region 3             0x0 0
  Region 4             0x1 1
  Region 5             0x1 1
  Region 6             0x0 0
  Region 7             0x0 0
DTCM cfg   0x40000006
  Reserved0_1          0x0 0
  Size                 0x3 3 [4K]
  Undef0_7             0x0 0
  Base                 0x20000 131072 [0x40000000]
ITCM cfg   0x00000006
  Reserved0_1          0x0 0
  Size                 0x3 3 [4K]
  Undef0_7             0x0 0
  Base                 0x0 0 [0x00000000]

 - card_bootflags 101c14
 - boot_read/write_sector 107d78 107d80
 - 102424: cf_dir (cfata_init error)\n
 - 1020a8: cf_read_dma (cfata_init error)\n
 - 107C74 Card init => 0
 - Saving RESCUE.LOG ...

4
What do you get if you try "unified" helloworld with digic6 branch?
Maybe there are some changes from a1ex useful to make it stable enough.

The Canon UI is unresponsive, often the camera locks up.  Sometimes it doesn't and half press will give you exposure info.  Sometimes the off switch does a clean shutdown, generally not.
I had experience of GUI lockup when updating 5DC port to more recent codebase; If I was quick enough I could as example enter the canon menu before ml override the task responsabile for buttons handling.

Don't remember exactly how I solved but probably was some missing initializzation in the custom ml_init for vxworks cameras. I had to doublecheck with the "unified" code to notice what was missing to load gui.

Also was missing initializzation of memory allocator...

ML is getting far enough that it prints a warning: "Camera was not shutdown cleanly. Skipping module loading" - pretty good.
Maybe here it is hanging on the first startup of Ml (after copy files to card, wiping previous settings) locking the camera and skipping module initializzation on the next round because of the undeleted module lock file in the card...

On vxworks it try to scan the directory to list all modules but doesn't iterate thought, so  camera appears as freezed...

Try to notice what is happening with fresh a install and see if the lock file is still present after shutdown.
If you want to disable modules, just comment module_task creation in ml_big_init

5
Scripting Q&A / Re: Script state at camera switch off
« on: July 11, 2019, 12:44:12 AM »
config.create_from_menu works great for me.
But how can I get and set values in the config without using a menu?
My autorun script needs to store state between reboots, and using a hidden menu (in addition to actual menu items) just to store state is not great
Thats basically because you are not using the "pointer" returned by "config.create()" or "config.create_from_menu()".
I tried using "config" instead, but no dice.
Only use public methods/returned values and don't access/modify global variables or private functions from config.lua (ex. "config" table or config.serialize() ), because if the current implementation will change in the future, your script will not works or will not behave as you may expecting.

After loading the config from a file, the library initialize and load all values inside his internal data structure.
This is a simplified overview on how it's memorized in memory:
Code: [Select]
config = {} -> a table, basically the script it's memorizing here what it needs during his usage
|- ...
|- configs -> in this table there is one entry for each script
|- ...

Each script's entry is following this structure:
|- filename
|- default -> a table or simple entry, initial value for each entry of data
|- data    -> this is a table containing the actual values
   Example for one menu:
   |- "MenuName" -> key for the corresponding menu table
      |- ... -> one <key,value> pairs for each menu entry (value is a table if it's a submenu)
   Example of a table:
   |- {"key" = value}

An example of usage with a configuration saved as a table:
Code: [Select]
require("config")

configuration = {["Apples"] = 1,["Eggs"] = 2}
my_config = config.create(configuration);

print(my_config.data["Apples"])
If during the script you change values in my_config somehow, they should get saved to file and loaded at the next run.



Very Important: There is a bug in the current implementation of Config's Lib (lua_fix and derived) when calling more than one config.create() in the same script.

Take a look at this example (it's untested, it's from what I remember):
Code: [Select]
FirstTable = {1,2,3, name = "alex"}
SecondTable = {"a","b", text = "Hello World!"}

config.create(FirstTable);
config.create(SecondTable);

This is a representation of what is memorized:
Code: [Select]
{
  [1] = "a",
  [2] = "b",
  [3] = 3,
  ["name"] = "alex",
  ["text"] = "Hello World!"
}
Basically the second config is overwriting the first two entries because they doesn't have a specified key so they are mapped to integers.



I have found Lua API documentation mostly helpful, but some entries are rather minimal.
Yes, it needs some improvements :)

https://bitbucket.org/hudson/magic-lantern/src/manual_lens_info/scripts/lens.lua (example for menu with custom state)
This script is using a modified version of the library, so keep it as reference if you need a complex usage but don't forget to use correct config.lua from manual_lens_info otherwise will not works with multiple menu's config in the same script as in lens.lua.

Bottom line: I am happy to support, ie I share my humble scripting attempts to help others, but I truly believe the Lua API documentation needs someone with 'insider knowledge' to add (more) value. That is 'right first time'.
@garry23 I added support for nested submenus and allowed to have separate menu entries (to avoid packing all into a single big chunk and have separate menus organized by functionality); Let me know if there is something wrong in the case you or someone else test it.

6
Camera-specific discussion / Re: Canon 50D
« on: May 28, 2019, 02:19:35 PM »
Don't know if this is a bug or not (I'm not a regular 50D user) but ISO does not change from the
magic lantern menu , it only changes setting by the top dial on camera , in the little LCD screen on top
has the correct reading but ML report a different thing e.g. 100ISO . Using mlv_rec .

Can any other 50D user confirm this or not or is this how it is ?
Quick check using lua_fix (both mlv_lite and mlv_rec) by changing ISO in ML menu I get correct values in top lcd and photo mode, but I get the value doubled in ML info bar while using LV.

Same happens if I use top buttons to change ISO.

7
Figured out what wasn't working with my patch.
Continuous blinking led was due to dump_with_buffer() in init.c and no boot was due to a wrong stub (double-checked Stubs.s with the one from scrax)

@scrax I committed current changes to my repository.
If anyone wants to try the current changes (+ PLAY mode saturation re-enabled but not committed yet), you can find a compiled build here

I'm still trying to figure out how to solve module loading (same problem with config reset/load and all other src files which are using ATTR_DIRECTORY code-block) and why Histogram is not being drawn.

I tried to enable Screenshoot but did't saved anything to card yet... with White Balance feature I get property change request errors.
Didn't tried to enable others because I was first figuring how to fix previous features with the recent codebase.

DebugMsgs are working, need to find how to intercept messages from MPU.

8
Regarding text in "Show Task" submenu... I played a bit with the code and got it printed good, it appears to be a problem with x position/spacing between each line; also Canon tasks are so much and need an additional windows to lists them all.

Found how to re-enable overlay in play mode, but I need to figure out why Histogram is not rendered (can see only borders) and Vectorscope/Waveform/Spotmeter get away when zebra and Focus Peek are enabled because it clean the framebuffer.

Regarding Intervalometer... it worked sometimes but I need to check again in which cases picture is taken.

Modules loading still crashes without enabling anything (only available arkanoid, file_man, bench, pic_view from compilation), but this time error message is different.
Finally I found where module loading get stuck, but did't found a solution yet...
Code: [Select]
do
    {
        if (file.mode & ATTR_DIRECTORY){
            printf("Is a directory\n");             
           continue; // is a directory            <---- HERE
         }
        if (module_valid_filename(file.name))     <---- NEVER TAKEN
        {
            printf("NOT a directory\n");
            char module_name[MODULE_FILENAME_LENGTH];

            .....

    } while( FIO_FindNextEx( dirent, &file ) == 0);
    FIO_FindClose(dirent);
Is looping in the folder condition indefinitely....

@a1ex What do you think? Is code not compatible with vxworks or maybe there is a problem with the FIO_FindNextEx stub?

I checked if unified got some fix but there is nothing related and don't know if it's a problem also for other vxworks cameras like 450D (Can't check in Qemu because I think the rom dump I have is not ok)

9
Had a look again at ML initialization routine for missing calls and now is looking much better :)



I'm using this sequence inside ml_big_init_task() of platform/5DC.111/init.c:
Code: [Select]
  _mem_init();
  bmp_vram_idle_ptr = (int)malloc(360*240);
  _find_ml_card();
  _load_fonts();
  call("DisablePowerSave");
  _ml_cbr_init();
  menu_init();
  debug_init();
  call_init_funcs(0);
  msleep(200); // leave some time for property handlers to run
  config_load();
  debug_init_stuff();

Modules loading still crashes without enabling anything (only available arkanoid, file_man, bench, pic_view from compilation), but this time error message is different.

Overlays doesn't works (they were working in beta4), same with intervalometer and there are still some problem while rendering text of task list; MLU works, also expo change in play mode.



ETTR as text of config submenu, like with 450D, if I try to change camera freezes but after reboot wasn't appearing anymore (still a lot of empty selection)

10


Figured out how to use two patches from scrax to have a copy of his previous and post tracked what was the main problem.
Don't know why it's showing only 2 menu tabs.

Assert related to mem.c was solved adding "_mem_init()" before malloc space for "bmp_vram_idle_ptr" and to make loads fonts is necessaries to "call_init_funcs(0)" before "_load_fonts()".

If I try to load all tasks, I get an error related to 5DC.sym I still need to figure out, probably related to module_task.
Unfortunately I'm still unable to make my previous patch to works, even with init.c and gui.c from scrax's work.

Here is the link to the patch (may have unnecessary changes because is a mix of an old patch found in the forum).

Any help is appreciated

11
Some old notes which can come in handy on horizontal and vertical, plus a spreadsheet of the initial analysis.

Cmos[5] may be responsible of vertical crop area position; expected full-res up to 7 FPS compared to 5 FPS 5d2, due to faster clock speed.

Haven't tried yet to increase vertical resolution and reduce to minimum timing, because I'm currently experimenting in other areas.
I expect to see some interesting results from you, reeddercity. Good luck! :)

12
@scrax I tried again starting from vxworks-dm-spy branch (haven't tried your patch yet, but looks like it isn't complete, how should I use it?), but I get stuck with a 5 seconds blue led on and 5 seconds off, which I need to track down.

Anyone know what it means? Trash button doesn't works and  firmware version in Canon l's Menu wasn't replaced by ML

Will try to post a diff later if I can go over; I tried to not put all inside dummy.c and find what was possible, but some stubs looks like are not present in the Rom disassembly compared to 40D/450D.

Didn't change init.c a lot, just lunch firmware as a pointer because I wasn't able to find why compiler is not able to find reference inside Stubs S...
Noticed it is much different from the one used in 40D and 450D. Does it need to be updated or is better to leave as is because more specific to 5dc?

To make them compile, I had to add dm-spy-extra and exmem into makefile as extra objs

EDIT: ML initialization hangs when calling hijack_gui_main_task(), when malloc memory for bmp_vram_idle_ptr or ml_big_init_task(); Menu and other buttons get partially overridden by hijacking function
Code: [Select]
diff --git a/platform/40D.111/Makefile.setup.default b/platform/40D.111/Makefile.setup.default
--- a/platform/40D.111/Makefile.setup.default
+++ b/platform/40D.111/Makefile.setup.default
@@ -13,4 +13,5 @@
 ML_SRC_EXTRA_OBJS = \
  init.o \
  dummy.o \
- dm-spy.o
+ dm-spy.o \
+ dm-spy-extra.o
diff --git a/platform/40D.111/stubs.S b/platform/40D.111/stubs.S
--- a/platform/40D.111/stubs.S
+++ b/platform/40D.111/stubs.S
@@ -221,6 +221,9 @@
 NSTUB(0xFFD56470,  TryPostStageEvent)
 NSTUB(0xFFD564FC,  TryPostStageEvent_end)                   // PendStageEvent
 
+//TODO:
+NSTUB(0xFFD6A1C8,  current_task)                        // 0x22E00
+
 NSTUB(0xFFD6A1C8,  get_current_task)                        // 0x22E00
 NSTUB(0xFFD69F8C,  get_task_info)
 NSTUB(0xFFD6B8B0,  get_active_task_list)
diff --git a/platform/Makefile.platform.map b/platform/Makefile.platform.map
--- a/platform/Makefile.platform.map
+++ b/platform/Makefile.platform.map
@@ -14,10 +14,10 @@
  700D.114 \
  EOSM.202 \
  1100D.105 \
+ 5DC.111 \
  6D.116
 
 PLATFORM_MAP_UNMAINTAINED = \
- 5DC.111 \
  100D.100 \
 
 platform_map = $(filter $(1).%, $(PLATFORM_MAP))
diff --git a/platform/unmaintained/5DC.111/Makefile.setup.default b/platform/unmaintained/5DC.111/Makefile.setup.default
--- a/platform/unmaintained/5DC.111/Makefile.setup.default
+++ b/platform/unmaintained/5DC.111/Makefile.setup.default
@@ -10,16 +10,18 @@
  fps-engio.o \
  audio-ak.o \
  movtweaks.o \
- exmem.o \
  liveview.o \
  bootflags.o \
  lv-img-engio.o \
  hdr.o \
+ exmem.o \
+
 
 ML_SRC_EXTRA_OBJS = \
  init.o \
  dummy.o \
  dm-spy.o \
- tp-spy.o
+ dm-spy-extra.o \
+ # tp-spy.o
 
 CFLAG_USER += -Wno-unused-variable
diff --git a/platform/unmaintained/5DC.111/consts.h b/platform/unmaintained/5DC.111/consts.h
--- a/platform/unmaintained/5DC.111/consts.h
+++ b/platform/unmaintained/5DC.111/consts.h
@@ -2,8 +2,12 @@
  *  5Dc 1.1.1 consts
  */
 
+extern int _dummy_variable;
+
 #define CANON_SHUTTER_RATING 100000
 
+#define CARD_DRIVE "A:/"
+
 #define CARD_LED_ADDRESS 0xC02200A0 // http://magiclantern.wikia.com/wiki/Led_addresses
 #define LEDBLUE     *(int*)0xC02200F0
 #define LEDRED      *(int*)0xC02200A0
@@ -14,7 +18,7 @@
 #define FORMAT_BTN "[Q]"
 #define STR_LOC 11
 
-#define YUV422_LV_BUFFER_1 0x10b63e8
+#define YUV422_LV_BUFFER_1 0x10b63e8
 #define YUV422_LV_BUFFER_2 0x10b63ec
 #define YUV422_LV_BUFFER_3 0x10b63f0
 #define YUV422_LV_BUFFER_DISPLAY_ADDR YUV422_LV_BUFFER_1
@@ -39,7 +43,11 @@
 #define PLAY_MODE (gui_state == GUISTATE_PLAYMENU && MEM(0x27D8) && !MEM(0x3D50)) // StartPl1App, but not StartPlEraseApp
 #define MENU_MODE (gui_state == GUISTATE_PLAYMENU && MEM(0x4C48)) // StartMenuMainHeaderApp
 
-#define CURRENT_GUI_MODE (gui_state == GUISTATE_PLAYMENU ? 1 : 0)
+// TODO:
+//#define CURRENT_GUI_MODE (gui_state == GUISTATE_PLAYMENU ? 1 : 0)
+#define CURRENT_GUI_MODE 1
+#define GUIMODE_PLAY 2
+#define GUISTATE_QR_ZOOM 3
 
 #define NUM_PICSTYLES 9
 #define PROP_PICSTYLE_SETTINGS(i) (PROP_PICSTYLE_SETTINGS_STANDARD - 1 + i)
@@ -106,4 +114,3 @@
 //~ #define ARROW_MODE_TOGGLE_KEY ""
 
 #define WINSYS_BMP_DIRTY_BIT_NEG 0
-
diff --git a/platform/unmaintained/5DC.111/dummy.c b/platform/unmaintained/5DC.111/dummy.c
--- a/platform/unmaintained/5DC.111/dummy.c
+++ b/platform/unmaintained/5DC.111/dummy.c
@@ -2,6 +2,7 @@
 #include "bmp.h"
 #include "gui.h"
 #include "menu.h"
+#include "timer.h"
 
 // dummy stubs
 
@@ -14,17 +15,17 @@
 //~ void *CreateRecursiveLock(int n){}
 void *ReleaseRecursiveLock(void *lock){ return NULL; }
 //void bmp_zoom(uint8_t* dst, uint8_t* src, int x0, int y0, int denx, int deny) { return; }
-struct memSuite * shoot_malloc_suite_contig(size_t size) { return 0; }
-struct memSuite *shoot_malloc_suite(size_t size) { return 0; }
+struct memSuite * _shoot_malloc_suite_contig(size_t size) { return 0; }
+struct memSuite * _shoot_malloc_suite(size_t size) { return 0; }
 struct memChunk * GetFirstChunkFromSuite(struct memSuite * suite) { return 0; }
-void* GetMemoryAddressOfMemoryChunk(struct memChunk * chunk) { return 0; }
-void shoot_free_suite(struct memSuite * hSuite) { return; }
+//void* GetMemoryAddressOfMemoryChunk(struct memChunk * chunk) { return 0; }
+//void shoot_free_suite(struct memSuite * hSuite) { return; }
 struct memChunk * GetNextMemoryChunk(struct memSuite * suite, struct memChunk * chunk) { return 0; }
 int audio_meters_are_drawn() { return 0; }
 int override_zoom_buttons = 0;
 void lcd_release_step(){};
 void force_liveview() {};
-int lcd_release_running = 0;
+//int lcd_release_running = 0;
 void set_shooting_mode(){};
 int get_screen_layout(){ return 0; };
 void rec_notify_trigger(){};
@@ -41,9 +42,9 @@
 int is_mvr_buffer_almost_full(){ return 0; }
 void rec_notify_continuous(){};
 void movie_indicators_show(){};
-void display_shooting_info(){};
-void free_space_show_photomode(){};
-void dialog_redraw(){}
+//void display_shooting_info(){};
+//void free_space_show_photomode(){};
+void dialog_redraw(struct dialog * dialog){}
 int digic_iso_gain_photo;
 int digic_iso_gain_movie;
 void MuteOff_0(){}
@@ -77,7 +78,7 @@
 void volume_up(){};
 void volume_down(){};
 
-void _EngDrvOut(int addr, int value) { MEM(addr) = value; }
+void _EngDrvOut(uint32_t reg, uint32_t value) { MEM(reg) = value; }
 uint32_t shamem_read(uint32_t addr) { return 0; }
 void _engio_write() {}
 
@@ -105,10 +106,12 @@
 int get_effective_hdr_iso_for_display(int raw_iso ) { return 1; };
 void set_movie_digital_iso_gain(int gain) {};
 
-int bmp_is_on() { return 1; }
+//int bmp_is_on() { return 1; }
 
-void* shoot_malloc(size_t size) { return AllocateMemory(size); }
-void shoot_free(void* ptr) { FreeMemory(ptr); }
+//void* shoot_malloc(size_t size) { return AllocateMemory(size); }
+void* _shoot_malloc(size_t size) { return malloc(size); }
+void _shoot_free(void* ptr) { free(ptr); }
+//void shoot_free(void* ptr) { FreeMemory(ptr); }
 
 void display_gain_toggle(){};
 //void yuv_resize(){};
@@ -118,3 +121,31 @@
 void movie_tweak_menu_init() {};
 //int hdr_video_enabled() { return 0; };
 int get_digic_iso_gain_movie() { return 0; };
+
+//Altre
+//int sound_recording_enabled() { return 0; }
+//void DeleteMemorySuite(struct memSuite * suite) { }
+int SetTimerAfter(int delay_ms, timerCbr_t timer_cbr, timerCbr_t overrun_cbr, void* priv) { return 0; }
+void CancelDateTimer();
+int64_t FIO_SeekSkipFile( FILE* stream, int64_t position, int whence ) { return 0; }
+//0xFF015E9C
+void SetGUIRequestMode(int mode){}
+void* _srm_malloc(size_t size){ return malloc(size);}
+void _srm_free(void* ptr){free(ptr);}
+int _srm_get_free_space(){return 0;}
+int _srm_get_max_region(){return 0;}
+int _shoot_get_free_space(){return 0;}
+int _shoot_free_suite(){return 0;}
+struct memSuite * _srm_malloc_suite(int num_requested_buffers){}
+void _srm_free_suite(struct memSuite * suite){}
+
+/* per exmec.c */
+struct memSuite * CreateMemorySuite(void* first_chunk_address, size_t first_chunk_size, uint32_t flags) { return 0; }
+struct memChunk * CreateMemoryChunk(void* address, size_t size, uint32_t flags) { return 0; }
+void DeleteMemorySuite(struct memSuite * suite) { }
+int sound_recording_enabled() { return 0; }
+void SRM_AllocateMemoryResourceFor1stJob(void (*callback)(void** dst_ptr, void* raw_buffer, uint32_t raw_buffer_size), void** dst_ptr) { }
+int AddMemoryChunk(struct memSuite * suite, struct memChunk * chunk) { return 0; }
+void CancelDateTimer();
+void SRM_FreeMemoryResourceFor1stJob(void* raw_buffer, int unk1_zero, int unk2_zero) { }
+//int GetSizeOfMaxRegion(int* max_region) { return 0; }
diff --git a/platform/unmaintained/5DC.111/features.h b/platform/unmaintained/5DC.111/features.h
--- a/platform/unmaintained/5DC.111/features.h
+++ b/platform/unmaintained/5DC.111/features.h
@@ -17,7 +17,7 @@
  #define FEATURE_HISTOGRAM
  #define FEATURE_WAVEFORM
  #define FEATURE_VECTORSCOPE
- #define FEATURE_OVERLAYS_IN_PLAYBACK_MODE
+//TODO: fixme #define FEATURE_OVERLAYS_IN_PLAYBACK_MODE
  //#define FEATURE_FALSE_COLOR
 
 /** Shoot menu **/
@@ -60,7 +60,7 @@
 
 /** Debug menu **/
 
- #define FEATURE_SCREENSHOT
+//TODO: Enable later #define FEATURE_SCREENSHOT
 
  #define FEATURE_DONT_CLICK_ME
 
@@ -72,4 +72,3 @@
     #define FEATURE_SHOW_FREE_MEMORY
 //#define FEATURE_SHOW_SHUTTER_COUNT //not working
     #define FEATURE_SHOW_CMOS_TEMPERATURE
-
diff --git a/platform/unmaintained/5DC.111/gui.c b/platform/unmaintained/5DC.111/gui.c
--- a/platform/unmaintained/5DC.111/gui.c
+++ b/platform/unmaintained/5DC.111/gui.c
@@ -16,19 +16,28 @@
 #include "dryos.h"
 
 struct semaphore * gui_sem;
+extern void gui_massive_event_loop2( uint32_t, void *, uint32_t );
+extern void unknown_gui_function(uint32_t,uint32_t);
+extern void GUI_ChangeMode(uint32_t);
+extern void other_gui_post_event(uint32_t,uint32_t*,uint32_t);
+extern int bindGUISwitchCBR(int,int,int,int);
+extern void DeleteTask(int);
+extern int QueryTaskByName(char *);
+extern int handle_mlu_toggle(struct event * event);
+//TODO: Adapt to gui.c from 40D - was refactored?
 
 // return 0 if you want to block this event
 static int handle_buttons(struct event * event)
 {
  ASSERT(event->type == 0)
-
+
  if (event->type != 0) return 1; // only handle events with type=0 (buttons)
  if (handle_common_events_startup(event) == 0) return 0;
  extern int ml_started;
  if (!ml_started) return 1;
 
  if (handle_common_events_by_feature(event) == 0) return 0;
-   
+
     if (handle_mlu_toggle(event) == 0) return 0;
 
  return 1;
diff --git a/platform/unmaintained/5DC.111/init.c b/platform/unmaintained/5DC.111/init.c
--- a/platform/unmaintained/5DC.111/init.c
+++ b/platform/unmaintained/5DC.111/init.c
@@ -1,4 +1,5 @@
 #include "dryos.h"
+#include "dryos-notes.h"
 #include "bmp.h"
 #include "gui.h"
 #include "menu.h"
@@ -8,9 +9,14 @@
 /** Specified by the linker */
 extern uint32_t _bss_start[], _bss_end[];
 extern void create_task_cmd_shell(const char * name);
+void hijack_gui_main_task();
 void ml_big_init_task(); // forward declaration
 int bmp_vram_idle_ptr;
 
+void config_parse_file( char * );
+extern uint32_t get_current_task();
+extern void ioGlobalStdSet(int,int);
+
 void start_debug_mode() {
  int file;
  char filename[20] = "A:/DEBUG.LOG"; // default name
@@ -18,7 +24,9 @@
  time_t t;
  struct tm tm;
 
- file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY , 644);
+// file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY , 644);
+file = (int) FIO_OpenFile(filename, O_CREAT | O_WRONLY );
+
  if(file > 0) {
  // redirect stdout and stderr to our file
  ioGlobalStdSet(1, file);
@@ -305,6 +313,7 @@
 #endif
 }/*}}}*/
 
+extern int init_code_run();
 void copy_and_restart()
 {/*{{{*/
  //blink(1);
@@ -350,8 +359,11 @@
 
  //cache_fake(0xFF810054, 0xE3A01078, TYPE_ICACHE); // MOV R1, #0x78
  //cache_fake(0xFF810058, 0xE2811A01, TYPE_ICACHE); // ADD R1, R1, 0x1004 - enable caches
- firmware_entry();
 
+ //TODO: fixme
+// firmware_entry();
+ void (*reset)(void) = (void*) ROMBASEADDR;
+ reset();
 
  // unreachable
  while(1) {
@@ -450,7 +462,7 @@
  To hijack an EventDispatch of a manager or module, remember:
  - Modules have a StageClass
  - Managers have a TaskClass
-
+
  The structures for these are already defined in state-object.h
  NOTE: you can only hijack one manager or module at a time. Never try to hijack more than one! (could brick camera).
  **/
@@ -596,7 +608,7 @@
  snprintf(assert_msg, sizeof(assert_msg),
  "ML ASSERT:\n%s\n"
  "at %s:%d (%s), task %s\n",
- msg,
+ msg,
  file, line, func, get_task_name_from_id(get_current_task())
  );
  request_crash_log(2);
@@ -625,3 +637,15 @@
  }
 }/*}}}*/
 
+
+/* For gui-comon.c */
+int magic_off = 0; // Set to 1 to disable ML
+
+unsigned short int magic_is_off()
+{
+    return magic_off;
+}
+
+void _disable_ml_startup() {
+    magic_off_request = 1;
+}
diff --git a/platform/unmaintained/5DC.111/stubs.S b/platform/unmaintained/5DC.111/stubs.S
--- a/platform/unmaintained/5DC.111/stubs.S
+++ b/platform/unmaintained/5DC.111/stubs.S
@@ -52,8 +52,10 @@
 NSTUB(0xFF811060,  aIcuFirmwareVer)
 NSTUB(0xFF811078,  aK213)
 NSTUB(0xFFB2A56C,  alloc_dma_memory)
+NSTUB(0xFFB2A56C,  _alloc_dma_memory)
 NSTUB(0xFF8B6248,  AllocateFileCacheItem)
 NSTUB(0xFFB2F664,  AllocateMemory)
+NSTUB(0xFFB2F664,  _AllocateMemory)
 NSTUB(0xFFB40474,  armInitExceptionModes)
 NSTUB(0xFF811000,  aRomReady)
 NSTUB(0xFFB44EC4,  asctime)
@@ -172,8 +174,11 @@
 NSTUB(0xFFB41CB0,  fputs)
 NSTUB(0xFFB41D38,  fread)
 NSTUB(0xFFB4CB14,  free)
+NSTUB(0xFFB4CB14,  _free)
 NSTUB(0xFFB2A5B0,  free_dma_memory)
+NSTUB(0xFFB2A5B0,  _free_dma_memory)
 NSTUB(0xFFB2F680,  FreeMemory)
+NSTUB(0xFFB2F680,  _FreeMemory)
 NSTUB(0xFFB41E3C,  freopen)
 NSTUB(0xFFB39988,  frexp)
 NSTUB(0xFFB42024,  fscanf)
@@ -195,6 +200,7 @@
 NSTUB(0xFFB1A1D0,  GetNameInformation)
 NSTUB(0xFFB42AC4,  gets)
 NSTUB(0xFFB19564,  GetSelfTaskHandle)
+NSTUB(0xffb2f734 ,GetSizeOfMaxRegion) //TODO: check again
 NSTUB(0xFFB1FF74,  GetSystemTime)
 NSTUB(0xFFB18430,  give_semaphore)
 NSTUB(0xFF812308,  GM_Initialize)
@@ -256,6 +262,7 @@
 NSTUB(0xFFB4B400,  logTask)
 NSTUB(0xFFB4130C,  longjmp)
 NSTUB(0xFFB4CB08,  malloc)
+NSTUB(0xFFB4CB08,  _malloc)
 NSTUB(0xFFB4CAF4,  memAddToPool)
 //NSTUB( 0xFFB4B774, memalign )
 //NSTUB( 0xFFB44664, memcpy )
@@ -626,6 +633,7 @@
 NSTUB(0xFFB29CC0,  TryPostStageEvent)
 NSTUB(0xFFB29D4C,  TryPostStageEvent_end)
 
+NSTUB(0xFFB57898,  current_task) //TODO: fixme
 NSTUB(0xFFB57898,  get_current_task)
 NSTUB(0xFFB58490,  get_task_info)
 NSTUB(0xFFB561F0,  get_active_task_list)
@@ -651,5 +659,3 @@
 NSTUB(0xFFB4641C,  sub_FFB4641C)
 NSTUB(0xFFB46508,  sub_FFB46508)
 NSTUB(0xFFB46478,  sub_FFB46478)
-
-
diff --git a/src/bootflags.c b/src/bootflags.c
--- a/src/bootflags.c
+++ b/src/bootflags.c
@@ -120,7 +120,7 @@
 
 // http://www.datarescue.com/laboratory/partition.htm
 // http://magiclantern.wikia.com/wiki/Bootdisk
-#if !defined(CONFIG_500D) && !defined(CONFIG_50D) && !defined(CONFIG_5D2) && !defined(CONFIG_40D) && !defined(CONFIG_450D)
+#if !defined(CONFIG_500D) && !defined(CONFIG_50D) && !defined(CONFIG_5D2) && !defined(CONFIG_40D) && !defined(CONFIG_450D) && !defined(CONFIG_5DC)
 int
 bootflag_write_bootblock( void )
 {
@@ -204,17 +204,17 @@
 {
 #if defined CONFIG_500D
     struct cf_device * const dev = sd_device[1];
-#elif defined(CONFIG_50D) || defined(CONFIG_5D2) || defined(CONFIG_40D) || defined(CONFIG_450D)// not good for 40D, need checking
+#elif defined(CONFIG_50D) || defined(CONFIG_5D2) || defined(CONFIG_40D) || defined(CONFIG_450D) || defined(CONFIG_5DC) // not good for 40D, need checking
     struct cf_device * const dev = cf_device[5];
 #endif
-   
+
     uint8_t *block = fio_malloc( 512 );
-   
+
     int i;
     for(i=0; i<512; i++) block[i] = 0xAA;
 
     dev->read_block( dev, 0, 1, block ); //overwrite our AAAs in our buffer with the MBR partition of the SD card.
-   
+
     // figure out if we are a FAT32 partitioned drive. this spells out FAT32 in chars.
     // FAT16 not supported yet - I don't have a small enough card to test with.
     //if( block[0x52] == 0x46 && block[0x53] == 0x41 && block[0x54] == 0x54 && block[0x55] == 0x33 && block[0x56] == 0x32 )
diff --git a/src/console.c b/src/console.c
--- a/src/console.c
+++ b/src/console.c
@@ -315,6 +315,7 @@
 
 /* some functions from standard I/O */
 
+#ifndef CONFIG_5DC
 int printf(const char* fmt, ...)
 {
     /* when called from init_task, 512 bytes are enough to cause stack overflow */
@@ -336,3 +337,4 @@
     console_puts("\n");
     return 0;
 }
+#endif
diff --git a/src/debug.c b/src/debug.c
--- a/src/debug.c
+++ b/src/debug.c
@@ -2004,7 +2004,7 @@
     return 1;
 }
 
-#if defined (CONFIG_40D) || defined(CONFIG_450D)
+#if defined (CONFIG_40D) || defined(CONFIG_450D) || defined(CONFIG_5DC)
 void _redraw_do() { }
 #endif
 
diff --git a/src/dryos-notes.h b/src/dryos-notes.h
--- a/src/dryos-notes.h
+++ b/src/dryos-notes.h
@@ -54,6 +54,7 @@
 extern void audio_level_task(void);
 extern void audio_interval_unlock(void*);
 
+/*
 extern FILE *
 FIO_OpenFile(
         const char *            name
@@ -63,7 +64,7 @@
  int mode
 #endif
 );
-
+*/
 extern ssize_t
 FR_SyncReadFile(
         const char *            filename,
diff --git a/src/fio-ml.c b/src/fio-ml.c
--- a/src/fio-ml.c
+++ b/src/fio-ml.c
@@ -353,18 +353,25 @@
 FILE* _FIO_OpenFile(const char* filename, unsigned mode );
 
 /* this one returns 0 on error, just like in plain C */
+/*#ifdef CONFIG_VXWORKS
+FILE* FIO_OpenFile(const char* filename, int flags,
+ int mode)
+
+#else*/
 FILE* FIO_OpenFile(const char* filename, unsigned mode )
+//#endif
+
 {
     char new_filename[FIO_MAX_PATH_LENGTH];
     fixup_filename(new_filename, filename, sizeof(new_filename));
-   
+
     FILE* f = _FIO_OpenFile(new_filename, mode);
-   
+
     if (f != PTR_INVALID)
     {
         return f;
     }
-   
+
     return 0;
 }
 
diff --git a/src/fio-ml.h b/src/fio-ml.h
--- a/src/fio-ml.h
+++ b/src/fio-ml.h
@@ -100,7 +100,19 @@
 };
 
 // file IO
+/*
+#ifdef CONFIG_VXWORKS
+extern FILE *
+FIO_OpenFile(
+        const char *            name
+ ,
+ int flags,
+ int mode
+);
+#else*/
 extern FILE* FIO_OpenFile( const char* filename, unsigned mode );
+//#endif
+
 extern int FIO_ReadFile( FILE* stream, void* ptr, size_t count );
 extern int FIO_WriteFile( FILE* stream, const void* ptr, size_t count );
 extern void FIO_CloseFile( FILE* stream );
diff --git a/src/mem.c b/src/mem.c
--- a/src/mem.c
+++ b/src/mem.c
@@ -1547,9 +1547,9 @@
             },
             MENU_EOL
         },
-    },
+    },
+#endif
 };
-#endif
 
 void mem_menu_init()
 {
diff --git a/src/menu.c b/src/menu.c
--- a/src/menu.c
+++ b/src/menu.c
@@ -129,7 +129,7 @@
 
 static int is_customize_selected();
 
-#if defined (CONFIG_40D)  || defined(CONFIG_450D)
+#if defined (CONFIG_40D)  || defined(CONFIG_450D) || defined(CONFIG_5DC)
 void CancelDateTimer() { }
 #else
 extern void CancelDateTimer();
diff --git a/src/posix.c b/src/posix.c
--- a/src/posix.c
+++ b/src/posix.c
@@ -40,10 +40,12 @@
 }
 
 /* warning - not implemented yet */
+#ifndef CONFIG_5DC
 int time()
 {
     return 0;
 }
+#endif
 
 int clock()
 {
diff --git a/src/raw.c b/src/raw.c
--- a/src/raw.c
+++ b/src/raw.c
@@ -288,6 +288,15 @@
      -887, 10000,     2129, 10000,    6051, 10000
 #endif
 
+#ifdef CONFIG_5DC // these values are in ufraw-0.22
+    //~{ "Canon EOS 40D", 0, 0x3f60,
+        //~{ 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } },
+    #define CAM_COLORMATRIX1                       \
+     6071, 10000,     -747, 10000,    -856, 10000, \
+    -7653, 10000,    15365, 10000,    2441, 10000, \
+    -2025, 10000,     2553, 10000,    7315, 10000
+#endif
+
 #ifdef CONFIG_40D // these values are in ufraw-0.22
     //~{ "Canon EOS 40D", 0, 0x3f60,
         //~{ 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } },
@@ -400,6 +409,11 @@
 static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
 #endif
 
+#ifdef CONFIG_5DC
+// TODO: FIXME: correct values
+static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
+#endif
+
 #ifdef CONFIG_450D
 // TODO: FIXME: correct values
 static int dynamic_ranges[] = {1100, 1094, 1060, 1005, 919, 826, 726, 633};
diff --git a/src/shoot.c b/src/shoot.c
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -1309,6 +1309,10 @@
 void expo_adjust_playback(int dir)
 {
 #ifdef CONFIG_5DC
+    //TODO: fixme
+    extern void BmpDDev_take_semaphore();
+    extern void BmpDDev_give_semaphore();
+
     static int expo_value = 0;
     if (dir == 0)
     {
diff --git a/src/tasks.c b/src/tasks.c
--- a/src/tasks.c
+++ b/src/tasks.c
@@ -210,6 +210,7 @@
     info->custom_drawing = CUSTOM_DRAW_THIS_MENU;
     
 #if defined(CONFIG_VXWORKS)
+/*extern int get_active_task_list(void* arr,int n)
 
     if (entry->selected)
     {
@@ -251,7 +252,7 @@
             y = 10;
         }
     }
-
+*/
 #else // DryOS - https://groups.google.com/forum/#!msg/ml-devel/JstGrNJiuVM/2L1QZpZ7F4YJ
 
     #ifdef CONFIG_TSKMON
diff --git a/src/tweaks.c b/src/tweaks.c
--- a/src/tweaks.c
+++ b/src/tweaks.c
@@ -1098,8 +1098,8 @@
                     while (!quickzoom_unpressed && PLAY_MODE)
                     {
                         #ifdef CONFIG_5DC
-                        (int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
-                        (int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
+                        MEM(IMGPLAY_ZOOM_LEVEL_ADDR) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
+                        MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) = MIN((int32_t)MEM(IMGPLAY_ZOOM_LEVEL_ADDR + 4) + 3, IMGPLAY_ZOOM_LEVEL_MAX);
                         #endif
                         fake_simple_button(BGMT_PRESS_ZOOM_IN);
                         msleep(50);

13
Magic Lantern Forum and Site Discussion / Re: what happened?
« on: May 07, 2019, 05:58:00 PM »
Would like to ask if there are more tutorials or documentation regarding module development apart the public "hello world".
It would be useful to know more about using CBRs and other modules related things (ex. sharing of procedures between 2 modules).

14
Camera-specific discussion / Re: Canon EOS R / RP
« on: April 27, 2019, 11:50:43 PM »
Don't know if it's a valid way to find bump buffer without a ram dump or MMIO logs, but found the "SetDrawWait" reference while looking for 6d2 and 800d stubs.

Pointer inside the function's body appears to match the 200D and 77D dumps. Maybe you can try with EOS R?

15
Camera-specific discussion / Re: Canon EOS R / RP
« on: April 27, 2019, 12:08:24 PM »
It probably locked due to firmware signature not corresponding.
I saw you didn't updated it yet in your repo.

You can also replace qprintf messages to print using uart if you prefer to not use qemu

16
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 19, 2019, 07:21:43 PM »
It still try to move over the limits, but first it goes back a little bit and then change again in the selected direction...
Also the motor make a different noise than normal

17
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 19, 2019, 07:12:27 PM »
If you enable Follow Focus (without loading the Lua module) and try to move the focus with the joystick, does that work? Similar messages on the console?
Yes similiar messages.



Positive values with left direction (infinity) and negative in the opposite (macro); also 1000 pop off immediatly when limit is reached, but stuck message after some tryes

18
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 19, 2019, 06:53:00 PM »
Autofocusing works in the tfirst stage (before pressing AF-ON) and then first second of the second stage, then reach infinity and get stuck



19
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 19, 2019, 06:35:53 PM »
It freezes whenever I turn off the camera (no matter how - from power switch or from card/battery doors). Repeatable. Default settings, no modules loaded.
No problems over here

That line of code should not execute on 50D; maybe the test contains a typo or something? I did not test that change (it was in the December 23 build, reply #438).
Yes is a typo. Test runs fine if I change the string.
From test logs:
Code: [Select]
camera = table:
  model = "Canon EOS 50D"
  model_short = "50D"

This part of the test appeared to work, to some extent, in unified, so... it's a regression.
Don't understand why camera shutdown immediatly during the test.
This appen also with an older unified build (Feb04-18), I don't remember if this was an issue with older build than these ones

While it's stuck trying to focus over infinity, are there "Lens moving" messages on the console? These are not logged; they are just printed. If yes, can you show me a few values? (a screenshot would be fine)
Yes a lot of them... Even if I manually move the autofocus ring in the opposite direction, some hits and then agin stuck.
Give me a few minutes to take the sceenshoot

20
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 19, 2019, 05:48:24 PM »
BTW, is the 50D able to shut down cleanly with the latest lua_fix build? The 5D2 is not (it locks up with both LEDs turned on).
What do you do exacly? If I use the build normally, it doesn't looks like it need a battery pull.
Camera freezes as described before if I run api_test.lua untouched and need to take battery out to power down camera.

Here are more detailed tests using lua_fix 20-03-19:
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 16:55:05
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 88
    apex = 4.
    ms = 63
    value = 0.0625
  aperture = table:
    raw = 32
    apex = 3.
    value = 2.8
    min = table:
      raw = 32
      apex = 3.
      value = 2.8
    max = table:
      raw = 88
      apex = 10.
      value = 32
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5500
  mode = 3
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 149
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  shoot = function: 0x9f1194
  bulb = function: 0x9f13c8
  reboot = function: 0x9f1168
  burst = function: 0x9f1448
  wait = function: 0x9f00c0
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: 0x9eea54
  write = function: 0x9eeae8
  hide = function: 0x9eea44
  clear = function: 0x9eea34
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  stop = function: 0x9f15e0
  resume = function: 0x9f1c68
  info = function: 0x9f1974
  start = function: 0x9f15d0
  pause = function: 0x9f1c78
  wait = function: 0x9f2038
lens = table:
  name = "17-50mm"
  focal_length = 17
  focus_distance = 0
  hyperfocal = 5466
  dof_near = 11139225
  dof_far = 1000000
  af = true
  af_mode = 0
  autofocus = function: 0x9f2b1c
  focus = function: 0x9f2ce4
display = table:
  idle = nil
  height = 480
  width = 720
  print = function: 0x9f4990
  load = function: 0x9f3854
  screenshot = function: 0x9f348c
  notify_box = function: 0x9f3624
  draw = function: 0x9f370c
  off = function: 0x9f3560
  on = function: 0x9f3570
  clear = function: 0x9f347c
  line = function: 0x9f44fc
  circle = function: 0x9f3ec8
  pixel = function: 0x9f47c4
  rect = function: 0x9f4198
key = table:
  last = 20
  press = function: 0x9f5168
  wait = function: 0x9f4ea0
menu = table:
  visible = false
  new = function: 0x9f7590
  get = function: 0x9f6934
  block = function: 0x9f56d0
  open = function: 0x9f54e0
  select = function: 0x9f6680
  set = function: 0x9f6754
  close = function: 0x9f54c8
movie = table:
  recording = false
  stop = function: 0x9f30e4
  start = function: 0x9f3178
dryos = table:
  clock = 15
  ms_clock = 15996
  image_prefix = "IMG_"
  config_dir = table:
    exists = true
    create = function: 0x9f88b4
    children = function: 0x9f873c
    files = function: 0x9f8620
    parent = table:
      exists = true
      create = function: 0x9f88b4
      children = function: 0x9f873c
      files = function: 0x9f8620
      parent = table:
        exists = true
        create = function: 0x9f88b4
        children = function: 0x9f873c
        files = function: 0x9f8620
        parent = nil
        path = "A:/"
      path = "ML/"
    path = "ML/SETTINGS/"
  ml_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f88b4
      children = function: 0x9f873c
      files = function: 0x9f8620
      parent = table:
        exists = true
        create = function: 0x9f88b4
        children = function: 0x9f873c
        files = function: 0x9f8620
        parent = table:
          exists = true
          create = function: 0x9f88b4
          children = function: 0x9f873c
          files = function: 0x9f8620
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a90
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  shooting_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f88b4
      children = function: 0x9f873c
      files = function: 0x9f8620
      parent = table:
        exists = true
        create = function: 0x9f88b4
        children = function: 0x9f873c
        files = function: 0x9f8620
        parent = table:
          exists = true
          create = function: 0x9f88b4
          children = function: 0x9f873c
          files = function: 0x9f8620
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a90
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  cf_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f88b4
      children = function: 0x9f873c
      files = function: 0x9f8620
      parent = table:
        exists = true
        create = function: 0x9f88b4
        children = function: 0x9f873c
        files = function: 0x9f8620
        parent = table:
          exists = true
          create = function: 0x9f88b4
          children = function: 0x9f873c
          files = function: 0x9f8620
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a90
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  sd_card = nil
  date = table:
    sec = 7
    month = 4
    hour = 16
    day = 19
    isdst = false
    min = 55
    wday = 3
    year = 2019
    yday = 1
  remove = function: 0x9f8114
  rename = function: 0x9f8040
  directory = function: 0x9f8180
  call = function: 0x9f7e3c
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: 0x9f94d0
battery = table:
function not available on this camera
stack traceback:
[C]: in ?
[C]: in for iterator 'for iterator'
ML/SCRIPTS/LIB/logger.lua:125: in function 'logger.serialize'
ML/SCRIPTS/API_TEST.LUA:45: in function <ML/SCRIPTS/API_TEST.LUA:44>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:44: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:90: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:1568: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunktask = table:
  yield = function: 0x9f9b38
  create = function: 0x9f9cb8
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
Camera Locks, battery pull required.

Running with test_io() disabled:
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 17:02:29
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 88
    apex = 4.
    ms = 63
    value = 0.0625
  aperture = table:
    raw = 32
    apex = 3.
    value = 2.8
    min = table:
      raw = 32
      apex = 3.
      value = 2.8
    max = table:
      raw = 88
      apex = 10.
      value = 32
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  ec = table:
    raw = 0
    value = 0
  flash = true
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5500
  mode = 3
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 149
  gui = table:
    menu = false
    play = false
    play_photo = false
    play_movie = false
    qr = false
    idle = true
  bulb = function: 0x9f1368
  shoot = function: 0x9f1134
  reboot = function: 0x9f1108
  wait = function: 0x9f0060
  burst = function: 0x9f13e8
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: 0x9ee9e4
  show = function: 0x9ee9f4
  clear = function: 0x9ee9d4
  write = function: 0x9eea88
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  overlays = false
  pause = function: 0x9f1c18
  info = function: 0x9f1914
  start = function: 0x9f1570
  wait = function: 0x9f1fd8
  resume = function: 0x9f1c08
  stop = function: 0x9f1580
lens = table:
  name = "17-50mm"
  focal_length = 32
  focus_distance = 0
  hyperfocal = 19312
  dof_near = -934934500
  dof_far = 1000000
  af = true
  af_mode = 0
  focus = function: 0x9f2c84
  autofocus = function: 0x9f2abc
display = table:
  idle = nil
  height = 480
  width = 720
  line = function: 0x9f449c
  off = function: 0x9f3500
  circle = function: 0x9f3e68
  on = function: 0x9f3510
  print = function: 0x9f4930
  notify_box = function: 0x9f35c4
  screenshot = function: 0x9f342c
  draw = function: 0x9f36ac
  pixel = function: 0x9f4764
  load = function: 0x9f37f4
  clear = function: 0x9f341c
  rect = function: 0x9f4138
key = table:
  last = 20
  wait = function: 0x9f4e40
  press = function: 0x9f5108
menu = table:
  visible = false
  new = function: 0x9f7530
  close = function: 0x9f5468
  get = function: 0x9f68d4
  select = function: 0x9f6620
  open = function: 0x9f5480
  block = function: 0x9f5670
  set = function: 0x9f66f4
movie = table:
  recording = false
  stop = function: 0x9f3084
  start = function: 0x9f3118
dryos = table:
  clock = 19
  ms_clock = 19920
  image_prefix = "IMG_"
  config_dir = table:
    exists = true
    create = function: 0x9f8854
    children = function: 0x9f86dc
    files = function: 0x9f85c0
    parent = table:
      exists = true
      create = function: 0x9f8854
      children = function: 0x9f86dc
      files = function: 0x9f85c0
      parent = table:
        exists = true
        create = function: 0x9f8854
        children = function: 0x9f86dc
        files = function: 0x9f85c0
        parent = nil
        path = "A:/"
      path = "ML/"
    path = "ML/SETTINGS/"
  ml_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f8854
      children = function: 0x9f86dc
      files = function: 0x9f85c0
      parent = table:
        exists = true
        create = function: 0x9f8854
        children = function: 0x9f86dc
        files = function: 0x9f85c0
        parent = table:
          exists = true
          create = function: 0x9f8854
          children = function: 0x9f86dc
          files = function: 0x9f85c0
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a30
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  shooting_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f8854
      children = function: 0x9f86dc
      files = function: 0x9f85c0
      parent = table:
        exists = true
        create = function: 0x9f8854
        children = function: 0x9f86dc
        files = function: 0x9f85c0
        parent = table:
          exists = true
          create = function: 0x9f8854
          children = function: 0x9f86dc
          files = function: 0x9f85c0
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a30
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  cf_card = table:
    drive_letter = "A"
    dcim_dir = table:
      exists = true
      create = function: 0x9f8854
      children = function: 0x9f86dc
      files = function: 0x9f85c0
      parent = table:
        exists = true
        create = function: 0x9f8854
        children = function: 0x9f86dc
        files = function: 0x9f85c0
        parent = table:
          exists = true
          create = function: 0x9f8854
          children = function: 0x9f86dc
          files = function: 0x9f85c0
          parent = nil
          path = "A:/"
        path = "A:/DCIM/"
      path = "A:/DCIM/109CANON/"
    file_number = 2411
    folder_number = 109
    free_space = 1168
    image_path = function: 0x9f8a30
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  sd_card = nil
  date = table:
    sec = 30
    year = 2019
    wday = 3
    day = 19
    hour = 17
    isdst = false
    min = 2
    yday = 1
    month = 4
  directory = function: 0x9f8120
  rename = function: 0x9f7fe0
  call = function: 0x9f7ddc
  remove = function: 0x9f80b4
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: 0x9f9470
battery = table:
function not available on this camera
stack traceback:
[C]: in ?
[C]: in for iterator 'for iterator'
ML/SCRIPTS/LIB/logger.lua:125: in function 'logger.serialize'
ML/SCRIPTS/API_TEST.LUA:45: in function <ML/SCRIPTS/API_TEST.LUA:44>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:44: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:90: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:1568: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunktask = table:
  create = function: 0x9f9c58
  yield = function: 0x9f9ad8
property = table:
Generic tests completed.

Module tests...
Testing Canon GUI functions...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Stop LiveView...
Start LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY 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...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter MENU mode...
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...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Canon GUI tests completed.

Testing ML menu API...
Menu tests completed.

Testing picture taking functions...
Snap simulation test...
Single picture...
A:/DCIM/109CANON/IMG_2412.CR2: 20937882
A:/DCIM/109CANON/IMG_2412.JPG not found.
Two burst pictures...
Ideally, the camera should be in some continuous shooting mode (not checked).
A:/DCIM/109CANON/ABC_2413.CR2: 21029918
A:/DCIM/109CANON/ABC_2413.JPG not found.
A:/DCIM/109CANON/ABC_2414.CR2: 21038890
A:/DCIM/109CANON/ABC_2414.JPG not found.
Bracketed pictures...
A:/DCIM/109CANON/IMG_2415.CR2: 18218930
A:/DCIM/109CANON/IMG_2415.JPG not found.
A:/DCIM/109CANON/IMG_2416.CR2: 20825360
A:/DCIM/109CANON/IMG_2416.JPG not found.
A:/DCIM/109CANON/IMG_2417.CR2: 21973768
A:/DCIM/109CANON/IMG_2417.JPG not found.
Bulb picture...
Elapsed time: 11847
A:/DCIM/109CANON/IMG_2418.CR2: 12013692
A:/DCIM/109CANON/IMG_2418.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...
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
warning: last key not half-shutter, but 20
Half-shutter test OK.

Testing module 'lv'...
Starting LiveView...

ML/SCRIPTS/API_TEST.LUA:1246: assertion failed!
stack traceback:
[C]: in function 'globals.assert'
ML/SCRIPTS/API_TEST.LUA:1246: in function 'globals.test_lv'
ML/SCRIPTS/API_TEST.LUA:1578: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunk

Starting from test_lens_focus():
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 17:15:26
===============================================================================

Module tests...

Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 0
Autofocus in LiveView...
Is there something to focus on?
29...28...27...26...Please trigger autofocus (half-shutter / AF-ON / * ).
59...58...57...56...55...54...53...52...51...50...49...48...Autofocus triggered.
Autofocus completed.
Focus distance: 0
Focusing backward...
Here autofocus can't be triggered with Half-Shutter, I used AF-ON.
Script was running in an infinite loop and Lens AF was stuck trying go over infinity

Only test_camera_exposure() and test_movie():
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 17:21:42
===============================================================================

Module tests...
Testing exposure settings...
Camera    : Canon EOS 50D (50D) 1.0.9
Lens      : 17-50mm
Shoot mode: 3
Shutter   : �5 (raw 75, 0.192776s, 193ms, apex 2.375)
Aperture  : �2.8 (raw 32, f/2.8, apex 3.)
Av range  : �2.8..�32 (raw 32..88, f/2.8..f/32, apex 3...10.)
ISO       : �1600 (raw 104, 1600, apex 9.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.


Testing movie recording...
Please switch to Movie mode.

ML/SCRIPTS/API_TEST.LUA:1550: assertion failed!
stack traceback:
[C]: in function 'assert'
ML/SCRIPTS/API_TEST.LUA:1550: in function 'test_movie'
ML/SCRIPTS/API_TEST.LUA:1581: in function <ML/SCRIPTS/API_TEST.LUA:1564>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:1564: in function 'api_tests'
ML/SCRIPTS/API_TEST.LUA:1603: in main chunk
Movie record (no raw and record key not set in ML menu) stopped automatically and then assertion was triggered.
Blue Led was ON but went OFF when switching back to photo mode and camera powered down normally.

Running test_lens_focus() in nightly Jul03-18:
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 17:45:18
===============================================================================

Module tests...
Focus distance: 0
Focusing backward...
Focus distance: 0
Focusing forward with step size 3, wait=true...
......................
Focus distance: 0
Focusing backward with step size 3, wait=true...
.....
Focus distance: 0
Focus range: 22 steps forward, 5 steps backward.
Focusing forward with step size 3, wait=false...
......
Focus distance: 0
Focusing backward with step size 3, wait=false...
.....
Focus distance: 0
Focus range: 6 steps forward, 5 steps backward.
Focusing forward with step size 2, wait=true...
...........................................
Focus distance: 0
Focusing backward with step size 2, wait=true...
.....
Focus distance: 0
Camera shutdown automatically after AF test went back and forth up to Soft Autofocus limits

All test up to  test_io():
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-19 17:57:11
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 0
    apex = -7.
    ms = 0
    value = 0
  aperture = table:
    raw = 32
    apex = 3.
    value = 2.799999
    min = table:
      raw = 32
      apex = 3.
      value = 2.799999
    max = table:
      raw = 88
      apex = 10
      value = 32
  iso = table:
    raw = 104
    apex = 9
    value = 1600
  ec = table:
    raw = -3
    value = -0.375
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5500
  mode = 2
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 158
  state = 0
  bulb = function: p
  shoot = 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
  clear = function: p
  hide = function: p
  show = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  stop = function: p
  pause = function: p
  wait = function: p
  info = function: p
  start = function: p
  resume = function: p
lens = table:
  name = "17-50mm"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = true
  af_mode = 0
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  line = function: p
  clear = function: p
  circle = function: p
  on = function: p
  screenshot = function: p
  rect = function: p
  pixel = function: p
  notify_box = function: p
  draw = function: p
  print = function: p
  load = function: p
  off = function: p
key = table:
  last = 0
  press = function: p
  wait = function: p
menu = table:
  visible = false
  new = function: p
  set = function: p
  block = function: p
  close = function: p
  get = function: p
  open = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 18
  ms_clock = 18579
  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/109CANON/"
  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 = 4096
    drive_letter = "A"
    file_number = 2419
    folder_number = 109
    free_space = 1052512
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  shooting_card = table:
    cluster_size = 4096
    drive_letter = "A"
    file_number = 2419
    folder_number = 109
    free_space = 1052512
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  date = table:
    wday = 3
    month = 4
    day = 19
    isdst = false
    min = 57
    hour = 17
    sec = 14
    yday = 1
    year = 2019
  directory = function: p
  call = function: p
  remove = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  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:30: in function <ML/SCRIPTS/API_TEST.LUA:29>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:29: in function 'print_table'
ML/SCRIPTS/API_TEST.LUA:75: in function 'generic_tests'
ML/SCRIPTS/API_TEST.LUA:634: in function 'api_tests'task = table:
  create = function: p
  yield = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Done!

21
Scripting Corner / Re: Lua Scripting (lua.mo)
« on: April 18, 2019, 10:41:05 PM »
I have problems running on 50D with a tamron 17-50mm wich doesn't report focus distance in focus tab.

Can't run because it lock the camera in both unified and lua_fix (tested unified feb 04-18 and appears to run up to AF test then camera powered down for uknow reasons).

This is what I got in the log of lua_fix:
Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-18 20:12:47
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 107
    apex = 6.375
    ms = 12
    value = 0.012048
  aperture = table:
    raw = 35
    apex = 3.375
    value = 3.2
    min = table:
      raw = 32
      apex = 3.
      value = 2.799999
    max = table:
      raw = 88
      apex = 10
      value = 32
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  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 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 149
  state = 0
  reboot = function: p
  bulb = function: p
  shoot = function: p
event = table:
  pre_shoot = nil
  post_shoot = nil
  shoot_task = nil
  seconds_clock = nil
  keypress = nil
  custom_picture_taking = nil
  intervalometer = nil
  config_save = nil
console = table:
  hide = function: p
  clear = function: p
  show = function: p
  write = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  start = function: p
  pause = function: p
  resume = function: p
  wait = function: p
  stop = function: p
  info = function: p
lens = table:
  name = "17-50mm"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = true
  af_mode = 0
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  pixel = function: p
  screenshot = function: p
  rect = function: p
  circle = function: p
  clear = function: p
  on = function: p
  print = function: p
  line = function: p
  notify_box = function: p
  off = function: p
  draw = function: p
  load = function: p
key = table:
  last = 0
  wait = function: p
  press = function: p
menu = table:
  visible = false
  new = function: p
  get = function: p
  block = function: p
  close = function: p
  open = function: p
  set = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 39
  ms_clock = 39732
  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/109CANON/"
  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 = 4096
    drive_letter = "A"
    file_number = 2409
    folder_number = 109
    free_space = 1198336
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  shooting_card = table:
    cluster_size = 4096
    drive_letter = "A"
    file_number = 2409
    folder_number = 109
    free_space = 1198336
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  date = table:
    hour = 20
    min = 12
    day = 18
    sec = 49
    month = 4
    year = 2019
    yday = 1
    wday = 2
    isdst = false
  call = function: p
  directory = function: p
  remove = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  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:30: in function <ML/SCRIPTS/API_TEST.LUA:29>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:29: in function 'print_table'
ML/SCRIPTS/API_TEST.LUA:75: in function 'generic_tests'
ML/SCRIPTS/API_TEST.LUA:634: in function 'api_tests'task = table:
  yield = function: p
  create = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Testing exposure settings, module 'camera'...
Camera    : Canon EOS 50D (50D) 1.0.9
Lens      : 17-50mm
Shoot mode: 3
Shutter   : ‚80 (raw 107, 0.012048s, 12ms, apex 6.375)
Aperture  : 3.2 (raw 35, f/3.2, apex 3.375)
Av range  : 2.8..32 (raw 32..88, f/2.799999..f/32, apex 3...10)
ISO       : 200 (raw 80, 200, apex 6.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-18 20:14:43
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 115
    apex = 7.375
    ms = 6
    value = 0.006024
  aperture = table:
    raw = 35
    apex = 3.375
    value = 3.2
    min = table:
      raw = 32
      apex = 3.
      value = 2.799999
    max = table:
      raw = 88
      apex = 10
      value = 32
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  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 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 153
  state = 0
  bulb = function: p
  reboot = function: p
  shoot = function: p
event = table:
  pre_shoot = nil
  post_shoot = nil
  shoot_task = nil
  seconds_clock = nil
  keypress = nil
  custom_picture_taking = nil
  intervalometer = nil
  config_save = nil
console = table:
  hide = function: p
  show = function: p
  write = function: p
  clear = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  stop = function: p
  info = function: p
  pause = function: p
  start = function: p
  wait = function: p
  resume = function: p
lens = table:
  name = "17-50mm"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = true
  af_mode = 0
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  pixel = function: p
  draw = function: p
  print = function: p
  screenshot = function: p
  off = function: p
  circle = function: p
  on = function: p
  load = function: p
  notify_box = function: p
  clear = function: p
  line = function: p
  rect = function: p
key = table:
  last = 0
  press = function: p
  wait = function: p
menu = table:
  visible = false
  set = function: p
  new = function: p
  get = function: p
  close = function: p
  block = function: p
  open = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 21
  ms_clock = 22024
  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/109CANON/"
  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 = 4096
    drive_letter = "A"
    file_number = 2409
    folder_number = 109
    free_space = 1198336
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  shooting_card = table:
    cluster_size = 4096
    drive_letter = "A"
    file_number = 2409
    folder_number = 109
    free_space = 1198336
    type = "CF"
    _card_ptr = userdata
    path = "A:/"
  date = table:
    min = 14
    isdst = false
    hour = 20
    year = 2019
    wday = 2
    month = 4
    sec = 45
    yday = 1
    day = 18
  remove = function: p
  directory = function: p
  call = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  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:30: in function <ML/SCRIPTS/API_TEST.LUA:29>
[C]: in function 'xpcall'
ML/SCRIPTS/API_TEST.LUA:29: in function 'print_table'
ML/SCRIPTS/API_TEST.LUA:75: in function 'generic_tests'
ML/SCRIPTS/API_TEST.LUA:634: in function 'api_tests'task = table:
  yield = function: p
  create = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Testing exposure settings, module 'camera'...
Camera    : Canon EOS 50D (50D) 1.0.9
Lens      : 17-50mm
Shoot mode: 3
Shutter   : ‚160 (raw 115, 0.006024s, 6ms, apex 7.375)
Aperture  : 3.2 (raw 35, f/3.2, apex 3.375)
Av range  : 2.8..32 (raw 32..88, f/2.799999..f/32, apex 3...10)
ISO       : 200 (raw 80, 200, apex 6.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Error: shutter set to raw=97, got 0.03125s, expected 0.028656s
Error: shutter set to raw=97, got 31ms, expected 29ms
Error: shutter set to raw=97, got Tv5, expected Tv5.125
Error: shutter set to raw=97, got 96, expected 97 (raw)

This unified Jul 03-18:
Code: [Select]

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-18 22:40:29
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 83
    apex = 3.375
    ms = 96
    value = 0.096388
  aperture = table:
    raw = 32
    apex = 3.
    value = 2.799999
    min = table:
      raw = 32
      apex = 3.
      value = 2.799999
    max = table:
      raw = 88
      apex = 10
      value = 32
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  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 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 152
  state = 0
  reboot = function: p
  shoot = function: p
  bulb = function: p
event = table:
  pre_shoot = nil
  post_shoot = nil
  shoot_task = nil
  seconds_clock = nil
  keypress = nil
  custom_picture_taking = nil
  intervalometer = nil
  config_save = nil
console = table:
  clear = function: p
  write = function: p
  show = function: p
  hide = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  start = function: p
  stop = function: p
  resume = function: p
  pause = function: p
  wait = function: p
  info = function: p
lens = table:
  name = "17-50mm"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = true
  af_mode = 0
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  print = function: p
  clear = function: p
  on = function: p
  pixel = function: p
  rect = function: p
  line = function: p
  draw = function: p
  load = function: p
  circle = function: p
  notify_box = function: p
  screenshot = function: p
  off = function: p
key = table:
  last = 0
  press = function: p
  wait = function: p
menu = table:
  visible = false
  set = function: p
  block = function: p
  close = function: p
  open = function: p
  get = function: p
  new = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 25
  ms_clock = 25387
  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/109CANON/"
  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 = 4096
    drive_letter = "A"
    file_number = 2411
    folder_number = 109
    free_space = 1196608
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  shooting_card = table:
    cluster_size = 4096
    drive_letter = "A"
    file_number = 2411
    folder_number = 109
    free_space = 1196608
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  date = table:
    yday = 1
    wday = 2
    year = 2019
    month = 4
    isdst = false
    day = 18
    hour = 22
    sec = 31
    min = 40
  directory = function: p
  remove = function: p
  call = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  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:30: in function <ML/SCRIPTS/API_TEST.LUA:29>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:29: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:75: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:634: in function 'globals.api_tests'task = table:
  yield = function: p
  create = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt

===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2019-4-18 22:50:09
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 147
    apex = 11.375
    ms = 0
    value = 0.000376
  aperture = table:
    raw = 0
    apex = 0
    value = 0
    min = table:
      raw = 0
      apex = 0
      value = 0
    max = table:
      raw = 0
      apex = 0
      value = 0
  iso = table:
    raw = 80
    apex = 6.
    value = 200
  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 50D"
  model_short = "50D"
  firmware = "1.0.9"
  temperature = 152
  state = 0
  shoot = function: p
  reboot = function: p
  bulb = function: p
event = table:
  pre_shoot = nil
  post_shoot = nil
  shoot_task = nil
  seconds_clock = nil
  keypress = nil
  custom_picture_taking = nil
  intervalometer = nil
  config_save = nil
console = table:
  clear = function: p
  show = function: p
  write = function: p
  hide = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  stop = function: p
  info = function: p
  pause = function: p
  wait = function: p
  resume = function: p
  start = function: p
lens = table:
  name = ""
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = false
  af_mode = 3
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  load = function: p
  clear = function: p
  on = function: p
  pixel = function: p
  screenshot = function: p
  rect = function: p
  line = function: p
  draw = function: p
  notify_box = function: p
  print = function: p
  circle = function: p
  off = function: p
key = table:
  last = 0
  wait = function: p
  press = function: p
menu = table:
  visible = false
  open = function: p
  close = function: p
  set = function: p
  new = function: p
  block = function: p
  get = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 70
  ms_clock = 71064
  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/109CANON/"
  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 = 4096
    drive_letter = "A"
    file_number = 2411
    folder_number = 109
    free_space = 1196608
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  shooting_card = table:
    cluster_size = 4096
    drive_letter = "A"
    file_number = 2411
    folder_number = 109
    free_space = 1196608
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  date = table:
    year = 2019
    wday = 2
    yday = 1
    min = 50
    month = 4
    hour = 22
    sec = 11
    day = 18
    isdst = false
  directory = function: p
  remove = function: p
  call = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  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:30: in function <ML/SCRIPTS/API_TEST.LUA:29>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:29: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:75: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:634: in function 'globals.api_tests'task = table:
  yield = function: p
  create = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Testing exposure settings, module 'camera'...
Camera    : Canon EOS 50D (50D) 1.0.9
Lens      :
Shoot mode: 3
Shutter   : ‚2500 (raw 147, 0.000376s, 0ms, apex 11.375)
Aperture  : 0.0 (raw 0, f/0, apex 0)
Av range  : 0.0..0.0 (raw 0..0, f/0..f/0, apex 0..0)
ISO       : 200 (raw 80, 200, apex 6.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...

22
Camera-specific discussion / Re: Canon EOS R / RP
« on: April 18, 2019, 01:35:17 PM »
Canon released a new 1.2.0 firmware update for Eos R.

23
you can use Exiftool to extract modelId from raw (CR2, CR3) or jpeg.
Thanks, you just confirmed my initial thinking on how it was discovered for newer models

for CR2 see this poster : https://github.com/lclevy/libcraw2/blob/master/docs/cr2_poster.pdf,
it is stored in Makernote
Had a look at the poster and it helped me to understand better how offsets are handled inside the file format :)

you can also use craw2tool : https://github.com/lclevy/libcraw2/blob/master/user_manual.md
@lorenzo353 I also looked at your library when tried to manipulate exif tags in cr2 image, but if I don't remember wrong it's not minded to overwrite metadata.
Do you have any suggestions?

24
You can find the exposure limit patch here.

It doesn't works on top of branches with the patch manager (ex crop_rec_4k), but should works good in nightly and lua_fix

Please reports if it's all ok.

25
I mean compile with CONFIG_QEMU=y to enable qprintf in console.
Can't retrieve the exact command line now, should be appended after make command (tried in makefile one time and didn't worked with digic6 branch  so not sure about that method)

Pages: [1] 2 3 ... 8