lua_fix

View source
Author Commit Message Date Builds
25 commits behind unified.
Alex
selftest: save the stub test log in ML/LOGS
Alex
selftest: include the stub test summary in the log file
Alex
sokoban.lua: save current level in the config file (simple script using the "config" library)
Alex
sokoban.lua: refactored the main loop; fixed missing "you win" message
Alex
Lua: trigger the config_save event after running the main body of a script (this allows simple scripts to use the config library)
Alex
Lua: minor error handling cleanup (simplified logic)
David Milligan
config.lua fixes
Alex
console: fix displayed size when console has many empty lines
Alex
Lua: clear console when starting a script from menu
Alex
Lua: refactored iterations through lua_script list (use a getter for lua_State -> lua_script mapping whenever possible)
Alex
Lua: use a message queue for key.wait() (fixes missed key presses caused by race conditios, including quick press/release)
Alex
Lua: moved script semaphores into struct lua_script (refactor)
Alex
Lua: refactored lua_take_semaphore calls - checking for success: if (result == 0) instead of if(!result) - checking whether "sem" was set: use assert (rather than giving the same error message as a semaphore timeout)
Alex
Lua: disable powersave for simple scripts
Alex
menu: fix null pointer issue in dynamic menus
Alex
menu: fix regression in Modified menu (with API tests)
Alex
menu: removed obsolete menu screenshots
Alex
menu: workaround for file_man (fixme: still relying on name lookup to find submenus)
Alex
menu: store submenu parent in the menu structure; more submenu fixes
Alex
Makefile: with WIFI_SD=y, ping the card until it comes online (useful for router connections)
Alex
menu: allow is_menu_entry_selected to operate on submenus (for Lua menu.select; updated api_test.lua)
Alex
menu: refactored submenu selection to avoid duplicate code; minor rename
Alex
menu: removed side effects from get_current_submenu
Alex
menu: allow submenu selection by name (updated api_test.lua)
Alex
menu: fix parent menu issues in composite submenus
Alex
menu: refactored to fix thread safety in menu_add
Alex
menu: fix parent menu issues in most menus (todo: composite submenus)
Alex
menu: check whether each submenu entry actually has a parent (fixme: most don't)
Alex
menu: if the value field is very long, do not display the name (the value is probably verbose enough to figure out what it is)
Alex
Modules: moved Show console to top level
Alex
Memory backend: when checking available memory, allocate both Shoot ans SRM at the same time (they may overlap)
Alex
debug: reworked "Show GUI Events" to use the console
Alex
gui_common: removed unused ui_lock (everything calls gui_uilock instead)
Alex
console: enable in LiveView alongside with ML overlays (experimental)
Alex
Memory backend: fix initialization
Alex
Menu: use submenu_height for scrolling
Alex
ettr: fix debug code
Alex
Merged unified into lua_fix
Alex
menu: do not discard customization data for menus that are not yet loaded (e.g. for modules/scripts and other dynamic menus)
Alex
menu: do not overwrite existing customization data when reloading (only reload data for newly added menu entries)
Alex
menu: fix usage counters for menu items with placeholders
Alex
menu: allow simple submenus in Recent menu
Alex
menu: allow Debug entries in Junkie mode
Alex
Modules: make sure we can really use up to 64 of them (fix commit 8ad0912)
Alex
file_man: show status in main menu, if busy
Alex
file_man: disable powersaving during long copy/move operations
Alex
file_man: unified FileCopy and FileMove tasks to avoid duplicate code; report all errors to console and show a simple progress indicator
Alex
file_man: show timestamp for each file; align date/time column
Alex
menu: fix Junkie short text overflowing in some cases
Alex
menu: attempt to balance the automatic My Menu in Junkie mode (with many submenu entries used frequently, this menu could end up a lot more cluttered than regular menus)
Alex
menu: fix submenu entries disappearing in Junkie menu (frequently used submenu items shouldn't be moved to My Menu; they should be just copied)
Alex
menu: better duplicate menu warning; minor rename
Alex
lua.c: fix warning
Alex
Lua: only hide the console if it was opened by some auto-running script (and block the key pressed to hide the console, if any)
Alex
Lua: block keys on key.wait() hello.lua updated to wait only for SET (and block only this key)
Alex
Merged unified into lua_fix
Alex
menu: fix invalid indexing on menu choices not starting at 0 (reported by JohanJ at http://www.magiclantern.fm/forum/index.php?topic=14828.msg186252#msg186252 )
Alex
selftest: fix bad merge
Alex
Merged cache-fixes into lua_fix
Alex
Merged unified into lua_fix
Alex
menu: attempt to fix file_man crash (a little hackish...)
Alex
file_man: disable name lookup on its submenu (should fix speed regression in directories with many files - to be tested)
Alex
api_test.lua: tests for image_prefix and for bracketed images
Alex
Lua: camera.wait() (waits until the image was fully saved; required for testing dryos.image_prefix)
Alex
Lua: renamed dryos.prefix to dryos.image_prefix and fixed various things - only accept strings of length 4, or empty string to reset to default - fix operation after multiple changes
Alex
menu: fix buffer overflow (off by one) when hiding many menu items
Alex
menu: disable name look-up in Modules and Help
Alex
menu: allow disabling name lookup in any menu (e.g. to allow duplicate names, or for very large menus, or for dynamic menus not meant to be customized etc)
Alex
menu: removed some redundant null pointer checks (no longer needed after enforcing valid names)
Alex
menu: revert empty name usage in menus (affected: module.c f071d67, file_man 6390eba, my_menu, advanced toggles) (todo: fix duplicate menus in some other way)
Alex
menu.h: comments for struct menu_entry and struct menu
Alex
menu: make sure internal fields are not set before menu_add
Alex
menu: require valid name for all menus (easier than fixing null pointer errors)
Alex
config.c: fix read from null pointer
Alex
Undo e64c9a5 (shutdown lock-up)
Alex
Merged memcheck-fixes into lua_fix
Alex
mem.c: option to disable heap poisoning (useful when running in QEMU with -d memcheck - with this, overflowing reads will be caught as well)
Alex
menu.c: fix a thread safety issue in menu_remove (to reproduce: file manager crashed after navigating the menu back and forth a few times)
Alex
menu.c: fix incomplete initialization when creating menus (this time the memory warning was correct)
Alex
menu.h: disabled bit fields in struct menu (they caused false warnings in the memory checking tool)
Alex
Merged memcheck-fixes into lua_fix
Alex
lens.h: fix APEX for Auto ISO (return 0)
Alex
Merged unified into lua_fix
Alex
lens.h: fix bad merge
Alex
Lua: fix error checking in menu.get (also API test)
Alex
Lua: unify menu.get and menu.gets (using an optional argument for menu.get)
Alex
Merged unified into lua_fix
Alex
Lua: menu.gets (to get menu value as string) api_test.lua updated as well
Alex
menu: fix thread safety for menu_get_str_value_from_script
Alex
api_test.lua: test for menu automation API (selecting existing ML menus, changing values)
Alex
menu: misc fixes on select_menu_by_name (thread safety; fix conflict with initial menu selection; refuse to operate on submenus)
Alex
Lua: split menu open/select functionality
Alex
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
Alex
Menu: range checking for menu_set_value_from_script (Lua menu.set with integer value argument)
Alex
Menu: fix duplicate warning on 50D
Alex
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)
Alex
Lua: fix typo that prevented lens.focus_pos from appearing in the documentation
Alex
Lua: minor doc updates
Alex
Lua: tag all backend messages with [SCRIPT.LUA] where possible
Alex
recdelay.lua: misc fixes
Alex
Lua: disable auto-autorun (any script that should autorun must be configured manually by user)
Alex
Lua: test script for unloading behavior (unload.lua)
Alex
Lua: tag all backend messages with [Lua]; minor fine-tunings
Alex
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 f249ba4)
Alex
Fix compiling on cameras without Q button (broken in 459da11)
Alex
selftest: fix false warning in half-shutter test
Alex
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)
Alex
Modules: yet another attempt at fixing fast scrollwheel events (previous: b0891f9, 2cc2768)
Alex
Undo 2cc2768 (fast scrollwheel events no longer working)
Alex
api_test.lua: stronger half-shutter test; fine-tuned delays
Alex
api_test.lua: fix movie test on manual lenses
Alex
api_test.lua: fix bulb test on slow SD cameras
Alex
api_test.lua: fix AF test on manual lenses
Alex
lua_key: re-enabled yielding during key.wait() using the same workaround as task.yield()
Alex
Merged dynamic-my-menu into lua_fix (solves some menu issues)
Alex
Lua lens.autofocus(): fix for 100D (to be tested) Updated selftest module as well.
Alex
lua_key: disabled yielding during key.wait() (until a proper fix is implemented, better avoid multitasking)
Alex
lua_task: workaround to prevent troublesome task.yield() calls (appears to work, but cannot guarantee it's actually thread-safe)
Alex
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)
Alex
Merged focus into lua_fix (pull request #748) Focus backend updates and lens.focus_pos fine position counter
Alex
lens_focus: ported 5D2 focus fix on 50D and 500D. 550D and newer models don't need it, unsure about 7D (to be tested)
Alex
lvinfo: fix layout bug revealed by 56464bc 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)
Alex
Menu: fix duplicate warning in the Help tab on some models
Alex
Menu: updated navigation help
Alex
file_man: refactored action types with enum and case switch (compiler now checks whether all action types are covered)
Alex
file_man: use unnamed menu entries for speed (named entries are now checked for duplicates => slow in folders with many files)
Alex
Menu: some extra sanity checks during customization
Alex
Menu: removed duplicate definitions of menu_open_submenu
Alex
Modules: fix duplicate menu warning
Alex
Menu: check for duplicate entries (the check is repeated after each menu_add call)
Alex
Menu: refactored most menu iterations with for loops
Alex
Menu: autodetect whether placeholders are needed or not (removed menu_add_base; menu_add should be O(n) if no placeholders are used)
Alex
Menu: skip placeholders in entry_find_by_name; related cleanups
Alex
Menu: link each submenu entry with its parent entry (rather than using name lookup)
Alex
Merged lua_fix into dynamic-my-menu (other menu fixes + module API version)
Alex
Menu: fix selection in Modified menu (broken in 0b6fcbc)
Alex
lua_lens: minor doc update (return value for lens_focus)
Alex
Menu: minor display fixes in Junkie mode
Alex
Menu: fix some interferences between menu customization and dynamic menus
Alex
Menu: experiment - dynamic Junkie menu FIXME: manual Junkie customizations are overriden, unless at least one item is starred. Important?
Alex
force_liveview: fix operation after taking a picture
Alex
Menu: fix last entry not disappearing from Modified menu
Alex
Menu: fix initial selection when it is a dynamic menu http://www.magiclantern.fm/forum/index.php?topic=17811.0
Alex
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.
Alex
Menu: minor refactor (checking dynamic menus)
Alex
Menu: usage counters (for displaying a menu with recently used entries) Warning: existing menu customizations will be lost.
Alex
lua_movie: some more preconditions + API tests
Alex
api_test.lua: simple multitasking test (crashes, do not run on expensive cameras!)
Alex
Lua task.create: throw error on failure
Alex
Lua lens.focus: throw an error if preconditions (LiveView and autofocus) are not met
Alex
lens_focus: allow running right after taking a picture (experiment)
Alex
Lua lens.focus: updated default wait and docs
Alex
enter_play_mode: increase delay (fixes some redraw issues, e.g. in benchmarks)
Alex
Lua: nicer behavior in Junkie menu (still not perfect)
Alex
Modules: increase max count to 64
Alex
selftest.mo: fine-tuned AF test
Alex
Fix Q button handling on cameras with this button (bad includes)
Alex
Fix button handling outside menu (typo)
Alex
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.
Alex
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)
Alex
Lua: fix incomplete commit 8191fd4
Alex
lua_lv: lvinfo items default to any info bar
Alex
lua_menu: reorder functions so the most basic ones appear first in doc
Alex
lua_menu: drop menu customization attributes (overriding them doesn't work well anyway)
Alex
Lua: more doc updates (WIP)
Alex
lens.c: some debug info for focus commands (to be removed before merging)
Alex
lens.h: declared lens_info.focus_pos on remaining cameras (tested on 5D3 123; to be tested on EOS M, 6D...)
Alex
Merged lua_fix into focus
Alex
Lua: misc doc updates (WIP)
Alex
lua_constants: reordered to get the simpler ones first in the doc
Alex
Lua: remove pre_shoot/post_shoot from docs (not yet implemented)
Alex
menu.c, select_menu_by_name: allow optional entry_name parameter; keep the current selection on error
Alex
copy2m.lua: add its menu in the script submenu, rather than Prefs (fixes duplicate menu - there were 2 menus with the same name)
Alex
Lua: always open script submenu on SET; show menus created by script under the script menu
Alex
menu.c: fix null pointer in mod_menu_rebuild
Alex
menu.c, entry_find_by_name: do not return duplicate entries and entries from dynamic menus (to be tested)
Alex
selftest.mo: test for autofocus routines
Alex
Lua: camera.shoot() no longer autofocuses by default
Alex
Lua: removed global shoot(); use camera.shoot() instead
Alex
api_test.lua: minor typo
Alex
lens_take_picture: wait for file number to change before returning; minor cleanups
Alex
Lua lens.focus: delay default to 10ms when wait=false; doc updates
Alex
force_liveview: make sure LV is fully started before returning
Alex
Lua: experimental lens.autofocus()
Alex
Lua: fine-tuned startup messages
Alex
Merged unified into lua_fix
Alex
Modules: allow including module.h in multiple source files (fixes compilation of edmac.mo)
Alex
Modules: removed some unused definitions
Alex
api_test.lua: fix typo in lens.focus call, thanks garry23
Alex
Lua: menu.open() can optionally select a given menu or submenu
Alex
rbf_font: very rough support for tab characters
Alex
editor.lua: exit file dialog if menu is no longer active
Alex
Lua: allow editing any script from context menu using editor.lua (Q -> Edit Script)
Alex
Lua: basic support for script arguments (arg, ...) http://www.lua.org/manual/5.1/manual.html#6
Alex
Lua: always use first line as script name in menu (use ... if too long)
Alex
Lua: display script file name on the right if the script is not running
Alex
Lua: fine-tuned user feedback when loading/running scripts
Alex
Lua: check string length in pixels when choosing between script name (first line) or script filename for menu display
Alex
Merged unified into lua_fix
Alex
menu: fix regression about font bg color
Alex
bfnt_draw_char: option for not erasing the background (old behavior, to fix existing code)
Alex
bmp_printf: erase background when using FONT_CANON (to be tested)
Alex
bmp_printf: allow transparent text on transparent background (note: this breaks binary compatibility with modules)
Alex
Focus backend: fix lens getting stuck at one end (reset retry count after reporting error)
Alex
api_test.lua: minor fix for focus distance
Alex
Focus backend: only report focus error when the lens gets stuck (doesn't move at all after 2 retries)
Alex
Lua: exposed lens_info.focus_pos as lens.focus_pos and added an API test
Alex
Merged lua_fix into focus
Alex
lens.c: record relative focus motor position in lens_info.focus_pos, http://www.magiclantern.fm/forum/index.php?topic=4997
Alex
lens.c: removed EOSM-specific code that appears superfluous; are focus ring triggers still working?
Alex
fio-ml: fix Lua const char warnings in FIO_Rename/Copy/MoveFile
Alex
api_test.lua: minor cleanups
Alex
Lua: dryos.rename (including API tests)
Alex
Lua: ignore unknown button codes
Alex
api_test.lua: relax half-shutter check a bit (the event is not sent right away)
Alex
Lua: reserve 256K for umm_malloc instead of 512K (since we no longer load all scripts at once)
Alex
Merged in lua_umm_malloc (pull request #724) Use umm_malloc for Lua to reduce memory fragmentation
Alex
Close branch lua_umm_malloc
Alex
Lua: removed run_in_separate_task
Alex
Lua: menu item to show/hide the console
Alex
Lua: show last script error in menu (to be tested)
Alex
Lua: fix memory/semaphore leak when running the same script many times
Alex
Lua: hide "Run script" for complex scripts, since they can't be started twice
Alex
Lua: show errors in menu for complex scripts as well
Alex
Lua: refactored error handling in add_script
Alex
Lua: fix script loading loop (forgot FIO_FindClose)
Alex
scrnshot.lua: place menu item in its own script submenu
Alex
Lua: extract script name and description from comments (experiment)
Alex
Lua: allow any script to autorun; use a submenu for each script
Alex
Lua: show scripts right away after loading the autorun ones (no more delay)
Alex
Lua: cleanup passing script to lua_user_load_task
Alex
api_test.lua: converted to simple script, so it runs right away
Alex
pong.lua: fix undeclared counter
Alex
Lua: fix strict.lua after script unloading changes
Alex
Lua: fix some scripts randomly showing "error" state (refactored malloc/memset with calloc in lua.c)
Alex
mem.h: declared calloc
Alex
posix.c: fix calloc (error checking)
Alex
Lua: moved the "extra" scripts back (since the scripts are no longer loaded by default)
Alex
Modules: workaround for issue #2551 (UNPRESS_UDLR conflicting with UNPRESS_DP on 5D3)
David Milligan
lua scripting: update docs
David Milligan
lua scripting: some cleanups to the script menu display and help
David Milligan
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
David Milligan
lua scripting: fix interval.running return type (should be boolean)
Alex
Lua: make sure umm_malloc is never used for fio calls
Alex
Lua: fix format_memory_size in ml-lua-shim.c
Alex
Lua: also print the amount of memory reallocated with core routines
Alex
Lua: use umm_malloc, with a 512KB heap preallocated
Alex
Alex
api_test.lua: tests for half-shutter events
Alex
module_send_keypress: special handling for shutter button events (should fix key.press(KEY.HALFSHUTTER) and similar calls in Lua)
11 commits not shown.