Skip to content

Manual lens info

Bitbucket Importer requested to merge bitbucket/declined-pr-850 into branch/unified

Created originally on Bitbucket by larssteenhoff (Lars Steenhoff)

Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.

  • exmem: when autodetecting available memory, print all srm/shoot memory blocks to console

  • pong.lua: fix menu not always erased (race condition)

  • realloc: check for null pointers

  • memory backend: ignore null pointers passed to free (Lua does that)

  • memory backend: reduce memcheck area (should reduce overhead a bit)

  • shoot.h: exposed take_a_pic and take_fast_pictures

  • Lua: camera.shoot() now calls take_a_pic (warning: syntax changed)

  • Lua: added camera.burst(num_pictures)

  • Lua: fix camera.bulb(seconds)

  • api_test.lua: tests for camera.shoot, burst and bulb

  • SW1/SW2: wait for confirmation from Canon code (to be tested)

  • module_send_keypress: special handling for shutter button events (should fix key.press(KEY.HALFSHUTTER) and similar calls in Lua)

  • api_test.lua: tests for half-shutter events

  • Imported umm_malloc 8b9586c from https://github.com/rhempel/umm_malloc

  • Lua: use umm_malloc, with a 512KB heap preallocated

  • Lua: also print the amount of memory reallocated with core routines

  • Lua: fix format_memory_size in ml-lua-shim.c

  • Lua: make sure umm_malloc is never used for fio calls

  • lua scripting: fix interval.running return type (should be boolean)

  • lua scripting: script unloading and autorun options

    user can disable autorun scripts don't autorun until user runs them the first time "simple" scripts (no menus or events) don't autorun, only run on demand and unload when finished script menu now lists all available scripts, "simple" scripts can be run from here, "complex" scripts can have autorun disabled/enabled from here TODO: update docs TODO: the 'extra' directory is probably no longer needed

  • lua scripting: some cleanups to the script menu display and help

  • lua scripting: update docs

  • Modules: workaround for issue #2551 (closed) (UNPRESS_UDLR conflicting with UNPRESS_DP on 5D3)

  • Lua: moved the "extra" scripts back (since the scripts are no longer loaded by default)

  • posix.c: fix calloc (error checking)

  • mem.h: declared calloc

  • Lua: fix some scripts randomly showing "error" state (refactored malloc/memset with calloc in lua.c)

  • Lua: fix strict.lua after script unloading changes

  • pong.lua: fix undeclared counter

  • api_test.lua: converted to simple script, so it runs right away

  • Lua: cleanup passing script to lua_user_load_task

  • Lua: show scripts right away after loading the autorun ones (no more delay)

  • Lua: allow any script to autorun; use a submenu for each script

  • Lua: extract script name and description from comments (experiment)

  • scrnshot.lua: place menu item in its own script submenu

  • Lua: fix script loading loop (forgot FIO_FindClose)

  • Lua: refactored error handling in add_script

  • Lua: show errors in menu for complex scripts as well

  • Lua: hide "Run script" for complex scripts, since they can't be started twice

  • Lua: fix memory/semaphore leak when running the same script many times

  • Lua: show last script error in menu (to be tested)

  • Lua: menu item to show/hide the console

  • Lua: removed run_in_separate_task

  • Close branch lua_umm_malloc

  • Lua: reserve 256K for umm_malloc instead of 512K (since we no longer load all scripts at once)

  • api_test.lua: relax half-shutter check a bit (the event is not sent right away)

  • Lua: ignore unknown button codes

  • Lua: dryos.rename (including API tests)

  • api_test.lua: minor cleanups

  • fio-ml: fix Lua const char warnings in FIO_Rename/Copy/MoveFile

  • lens.c: removed EOSM-specific code that appears superfluous; are focus ring triggers still working?

  • lens.c: record relative focus motor position in lens_info.focus_pos, http://www.magiclantern.fm/forum/index.php?topic=4997

  • Lua: exposed lens_info.focus_pos as lens.focus_pos and added an API test

  • Focus backend: only report focus error when the lens gets stuck (doesn't move at all after 2 retries)

  • api_test.lua: minor fix for focus distance

  • Focus backend: fix lens getting stuck at one end (reset retry count after reporting error)

  • lens_info: new field is_chipped to allow safely overriding lens name

  • lua scripting: expose overwriting lens info

  • lens.lua: script for overriding lens info for manual lenses based on user selection

  • lua scripting: ui.lua minor cleanups and tweaks

  • lua scripting: xmp.lua metadata library (preliminary)

  • xmp.lua: code comments and minor refactorings

  • lua scriptiing: move common ui code out of editor.lua into lib/ui.lua and lib/filedlg.lua for reusability

  • lens.lua: ML menu item for changing manual lens

  • ui.lua: cleanups and minor tweaks

  • ui.lua: use specific keys for canceling selector

  • bmp_printf: allow transparent text on transparent background (note: this breaks binary compatibility with modules)

  • bmp_printf: erase background when using FONT_CANON (to be tested)

  • bfnt_draw_char: option for not erasing the background (old behavior, to fix existing code)

  • ui.lua: fix some refactoring typos

  • Modules: handle commit messages with non-ASCII characters (fixes compiling lua.mo)

  • lens.lua: store selected lens in config

  • config.lua fixes

  • lens.lua: fix config loading

  • lens.lua: fix parent menu name

  • ui.lua: reset cancel field to false when re-opening selection box

  • Slight adjustment of XMP indentation.

  • Slight adjustment of XMP indentation.

  • Backout changeset c15e153bd4d0

  • menu: fix regression about font bg color

  • Lua: check string length in pixels when choosing between script name (first line) or script filename for menu display

  • Lua: fine-tuned user feedback when loading/running scripts

  • Lua: display script file name on the right if the script is not running

  • Lua: always use first line as script name in menu (use ... if too long)

  • Lua: basic support for script arguments (arg, ...) http://www.lua.org/manual/5.1/manual.html#6

  • Lua: allow editing any script from context menu using editor.lua (Q -> Edit Script)

  • editor.lua: exit file dialog if menu is no longer active

  • rbf_font: very rough support for tab characters

  • Lua: menu.open() can optionally select a given menu or submenu

  • api_test.lua: fix typo in lens.focus call, thanks garry23

  • Modules: removed some unused definitions

  • Modules: allow including module.h in multiple source files (fixes compilation of edmac.mo)

  • Lua: fine-tuned startup messages

  • Lua: experimental lens.autofocus()

  • force_liveview: make sure LV is fully started before returning

  • Lua lens.focus: delay default to 10ms when wait=false; doc updates

  • lens_take_picture: wait for file number to change before returning; minor cleanups

  • api_test.lua: minor typo

  • Lua: removed global shoot(); use camera.shoot() instead

  • Lua: camera.shoot() no longer autofocuses by default

  • selftest.mo: test for autofocus routines

  • menu.c, entry_find_by_name: do not return duplicate entries and entries from dynamic menus (to be tested)

  • menu.c: fix null pointer in mod_menu_rebuild

  • Lua: always open script submenu on SET; show menus created by script under the script menu

  • copy2m.lua: add its menu in the script submenu, rather than Prefs (fixes duplicate menu - there were 2 menus with the same name)

  • menu.c, select_menu_by_name: allow optional entry_name parameter; keep the current selection on error

  • Lua: remove pre_shoot/post_shoot from docs (not yet implemented)

  • lua_constants: reordered to get the simpler ones first in the doc

  • Lua: misc doc updates (WIP)

  • lens.h: declared lens_info.focus_pos on remaining cameras (tested on 5D3 123; to be tested on EOS M, 6D...)

  • lens.c: some debug info for focus commands (to be removed before merging)

  • Lua: more doc updates (WIP)

  • lua_menu: drop menu customization attributes (overriding them doesn't work well anyway)

  • lua_menu: reorder functions so the most basic ones appear first in doc

  • lua_lv: lvinfo items default to any info bar

  • Lua: fix incomplete commit 8191fd4ab070

  • GUI: make sure all cameras use the BGMT_Q event while in ML menu, even if they don't actually have a Q button (should fix Lua scripts using the Q button while running on top of ML menu)

  • lens_focus: fix very slow follow focus on 5D2 with 24/2.8 STM (todo: 50D, 500D, others?) To reproduce: Step Wait ON, Step Delay <= 20, then use follow focus. Just changing prop_request_change_wait into prop_request_change would give fast movements, but crashes very quickly. Waiting for the pfAfComplete interrupt before next focus command appears to fix the crashes.

  • Fix button handling outside menu (typo)

  • Fix Q button handling on cameras with this button (bad includes)

  • selftest.mo: fine-tuned AF test

  • Modules: increase max count to 64

  • Lua: nicer behavior in Junkie menu (still not perfect)

  • enter_play_mode: increase delay (fixes some redraw issues, e.g. in benchmarks)

  • Lua lens.focus: updated default wait and docs

  • lens_focus: allow running right after taking a picture (experiment)

  • Lua lens.focus: throw an error if preconditions (LiveView and autofocus) are not met

  • Lua task.create: throw error on failure

  • api_test.lua: simple multitasking test (crashes, do not run on expensive cameras!)

  • lua_movie: some more preconditions + API tests

  • Menu: usage counters (for displaying a menu with recently used entries) Warning: existing menu customizations will be lost.

  • Menu: minor refactor (checking dynamic menus)

  • Menu: experiment - dynamic My Menu ("Recent"), based on usage counters If no menu items are manually starred, a menu named Recent will be built automatically.

  • Menu: fix initial selection when it is a dynamic menu http://www.magiclantern.fm/forum/index.php?topic=17811.0

  • Menu: fix last entry not disappearing from Modified menu

  • force_liveview: fix operation after taking a picture

  • Menu: experiment - dynamic Junkie menu FIXME: manual Junkie customizations are overriden, unless at least one item is starred. Important?

  • Menu: fix some interferences between menu customization and dynamic menus

  • Menu: minor display fixes in Junkie mode

  • lua_lens: minor doc update (return value for lens_focus)

  • Menu: fix selection in Modified menu (broken in 0b6fcbcc33e1)

  • Menu: link each submenu entry with its parent entry (rather than using name lookup)

  • Menu: skip placeholders in entry_find_by_name; related cleanups

  • Menu: autodetect whether placeholders are needed or not (removed menu_add_base; menu_add should be O(n) if no placeholders are used)

  • Menu: refactored most menu iterations with for loops

  • Menu: check for duplicate entries (the check is repeated after each menu_add call)

  • Modules: fix duplicate menu warning

  • Menu: removed duplicate definitions of menu_open_submenu

  • Menu: some extra sanity checks during customization

  • file_man: use unnamed menu entries for speed (named entries are now checked for duplicates => slow in folders with many files)

  • file_man: refactored action types with enum and case switch (compiler now checks whether all action types are covered)

  • Menu: updated navigation help

  • Menu: fix duplicate warning in the Help tab on some models

  • lvinfo: fix layout bug revealed by 56464bc703a0 and noticed here: http://www.magiclantern.fm/forum/index.php?topic=18083.msg177532#msg177532 (note: the linked commit did not cause the bug; it was there for years)

  • lens_focus: ported 5D2 focus fix on 50D and 500D. 550D and newer models don't need it, unsure about 7D (to be tested)

  • api_test.lua: weaker multitasking test (seems to work fine as long as only one task calls task.yield(); any task that interrupts should run until returns)

  • lua_task: workaround to prevent troublesome task.yield() calls (appears to work, but cannot guarantee it's actually thread-safe)

  • lua_key: disabled yielding during key.wait() (until a proper fix is implemented, better avoid multitasking)

  • Lua lens.autofocus(): fix for 100D (to be tested) Updated selftest module as well.

  • lua_key: re-enabled yielding during key.wait() using the same workaround as task.yield()

  • api_test.lua: fix AF test on manual lenses

  • api_test.lua: fix bulb test on slow SD cameras

  • api_test.lua: fix movie test on manual lenses

  • api_test.lua: stronger half-shutter test; fine-tuned delays

  • Undo 2cc2768bc324 (fast scrollwheel events no longer working)

  • Modules: yet another attempt at fixing fast scrollwheel events (previous: b0891f9ae3a7, 2cc2768bc324)

  • Memory backend: allow breaking minimum_free_space limit for small blocks (it was possible to fail the allocation for very small blocks that could not be covered by shoot_malloc)

  • selftest: fix false warning in half-shutter test

  • Fix compiling on cameras without Q button (broken in 459da116e0fe)

  • Lua: allow task unloading if all user tasks are stopped before the main task (this makes api_test.lua a "simple" script, as it was before f249ba4936bc)

  • Lua: tag all backend messages with [Lua]; minor fine-tunings

  • Lua: test script for unloading behavior (unload.lua)

  • Lua: disable auto-autorun (any script that should autorun must be configured manually by user)

  • recdelay.lua: misc fixes

  • Lua: tag all backend messages with [SCRIPT.LUA] where possible

  • Lua: minor doc updates

  • Lua: fix typo that prevented lens.focus_pos from appearing in the documentation

  • Screenshots: fix color palette (was affected by our palette changes, e.g. in menu) (the fix requires writing to Canon's LCD_Palette array, but a quick checked is performed before writing; previously, this array was considered read-only)

  • Menu: fix duplicate warning on 50D

  • Menu: range checking for menu_set_value_from_script (Lua menu.set with integer value argument)

  • Menu: reworked menu_set_str_value_from_script (for Lua menu.set with string value argument)

    • consider .choices array before trying brute-force
    • try every single value from the valid range when practical
    • use msleep only for custom toggle logic
    • wait and retry if the value doesn't change
    • fix some ambiguous matches (e.g. 1 should not match 1m10s, but 10 is OK for 10cm)
    • numeric match made optional
    • timeout 2s
  • Lua: split menu open/select functionality

  • menu: misc fixes on select_menu_by_name (thread safety; fix conflict with initial menu selection; refuse to operate on submenus)

  • api_test.lua: test for menu automation API (selecting existing ML menus, changing values)

  • menu: fix thread safety for menu_get_str_value_from_script

  • Lua: menu.gets (to get menu value as string) api_test.lua updated as well

  • Lua: unify menu.get and menu.gets (using an optional argument for menu.get)

  • Lua: fix error checking in menu.get (also API test)

  • lens.h: fix bad merge

  • ui.lua: ported 9f71744489f6 (not tested)

Merge request reports