|
|
| (21 intermediate revisions by 4 users not shown) |
| Line 10: |
Line 10: |
| |
|[[Script_commands|Script Commands]] |
|
|[[Script_commands|Script Commands]] |
| |
|[[Script_commands_stub|Script Commands Stub]] |
|
|[[Script_commands_stub|Script Commands Stub]] |
| |
+ |
|- |
| |
+ |
|[[User_Written_Scripts|User Written Scripts]] |
| |
+ |
|[[PropertyCase|Property Case Values]] |
| |
|} |
|
|} |
| |
|
|
|
| Line 19: |
Line 22: |
| |
|- |
|
|- |
| |
|[[UBASIC/TutorialScratchpad|uBASIC Tutorial Scratchpad]] |
|
|[[UBASIC/TutorialScratchpad|uBASIC Tutorial Scratchpad]] |
| − |
|[[UBASIC/Scripts|uBASIC Scripts]] |
|
| |
|} |
|
|} |
| |
|
|
|
| Line 31: |
Line 33: |
| |
|[[Lua/PTP_Scripting|Lua PTP Scripting]] |
|
|[[Lua/PTP_Scripting|Lua PTP Scripting]] |
| |
|- |
|
|- |
| − |
|[[Lua/Drawings|Lua Drawings]] |
+ |
|[[Lua/Drawings|Lua Draw Functions]] |
| |
|[[Lua/Lua_Reference/Native_Function_Calls#call_event_proc.28name.2C....29|Native Function Calls]] |
|
|[[Lua/Lua_Reference/Native_Function_Calls#call_event_proc.28name.2C....29|Native Function Calls]] |
| |
+ |
|- |
| |
+ |
| [[Lua_Development_Environment|Lua Development Environment]] |
| |
+ |
| [http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual ] |
| |
|} |
|
|} |
| |
|
|
|
| |
==Script Header Documentation== |
|
==Script Header Documentation== |
| − |
[http://chdk.wikia.com/wiki/CHDK_scripting#The_Script_Header CHDK Scripting - The Script Header] |
+ |
{| border="4" cellpadding="1" cellspacing="1" class="article-table" |
| − |
|
+ |
|- |
| − |
[http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad#The_Script_Header Tutorial Scratchpad - The Script Header] |
+ |
|[http://chdk.wikia.com/wiki/CHDK_scripting#The_Script_Header The Script Header] |
| |
+ |
|[http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad#The_Script_Header Tutorial - The Script Header] |
| |
+ |
|} |
| |
|
|
|
| |
==All Scripting Functions== |
|
==All Scripting Functions== |
| Line 157: |
Line 162: |
| |
| align="center" | [[CHDK_scripting#set_nd_filter | set_nd_filter ]]||Y||Y||moves neutral density filter into or out of the optical path |
|
| align="center" | [[CHDK_scripting#set_nd_filter | set_nd_filter ]]||Y||Y||moves neutral density filter into or out of the optical path |
| |
|- |
|
|- |
| − |
| align="center" | [[CHDK_scripting#get_sv96 | set_sv96 ]]||Y||Y||set APEX96 sensitivity value |
+ |
| align="center" | [[CHDK_scripting#set_sv96 | set_sv96 ]]||Y||Y||set APEX96 ISO sensitivity value |
| |
|- |
|
|- |
| |
| align="center" | [[CHDK_scripting#set_tv | set_tv ]]||N||Y||obsolete - replaced with set_user_tv_by_id |
|
| align="center" | [[CHDK_scripting#set_tv | set_tv ]]||N||Y||obsolete - replaced with set_user_tv_by_id |
| Line 302: |
Line 307: |
| |
|- |
|
|- |
| |
| align="center" | [[Script_commands#get_exp_count | get_exp_count ]]||Y||Y|| return number of shots in a session |
|
| align="center" | [[Script_commands#get_exp_count | get_exp_count ]]||Y||Y|| return number of shots in a session |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#get_image_dir.28.29 | get_image_dir ]]||Y||N|| get current image directory |
| |
|- |
|
|- |
| |
| align="center" | [[CHDK_scripting#get_disk_size | get_free_disk_space ]]||Y||Y||return space left on SD card |
|
| align="center" | [[CHDK_scripting#get_disk_size | get_free_disk_space ]]||Y||Y||return space left on SD card |
| Line 337: |
Line 344: |
| |
| align="center" | [[Script_commands#get_time | get_time ]]||Y||Y||returns elements of the camera\'s current date / time setting |
|
| align="center" | [[Script_commands#get_time | get_time ]]||Y||Y||returns elements of the camera\'s current date / time setting |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#get_autostart_.26_set_autostart | set_autostart(a) ]]||Y||Y||write conf.script_autostart (0=off, 1=on, 2=once) |
+ |
| align="center" | [[Script_commands#get_autostart_.26_set_autostart | set_autostart]]||Y||Y||write conf.script_autostart (0=off, 1=on, 2=once) |
| |
|- |
|
|- |
| |
| align="center" | [[Script_commands#set_yield | set_yield ]]||Y||Y||control how much of the Camera CPU time is used by scripting engine |
|
| align="center" | [[Script_commands#set_yield | set_yield ]]||Y||Y||control how much of the Camera CPU time is used by scripting engine |
| Line 363: |
Line 370: |
| |
| align="center" | [[Lua/Lua_Reference/Levent#get_levent_index.28event.29 | get_levent_index ]]||Y||N||returns the index of the given event |
|
| align="center" | [[Lua/Lua_Reference/Levent#get_levent_index.28event.29 | get_levent_index ]]||Y||N||returns the index of the given event |
| |
|- |
|
|- |
| − |
| align="center" | [[Lua/Lua_Reference/Levent#post_levent_.2A.28event.2C.5Bunk.5D.29 | post_levent_for_npt ]]||Y||N||<needs a definition> |
+ |
| align="center" | [[Lua/Lua_Reference/Levent#post_levent_.2A.28event.2C.5Bunk.5D.29 | post_levent_for_npt ]]||Y||N||Triggers a [[LogicalEvent]] in the Canon firmware. |
| |
|- |
|
|- |
| − |
| align="center" | [[Lua/Lua_Reference/Levent | post_levent_to_ui ]]||Y||N||<needs a definition> |
+ |
| align="center" | [[Lua/Lua_Reference/Levent | post_levent_to_ui ]]||Y||N||Triggers a [[LogicalEvent]] in the canon firmware. |
| |
|- |
|
|- |
| |
| align="center" | [[Lua/Lua_Reference/Levent | set_levent_active ]]||Y||N||<needs a definition> |
|
| align="center" | [[Lua/Lua_Reference/Levent | set_levent_active ]]||Y||N||<needs a definition> |
| Line 387: |
Line 394: |
| |
| align="center" | [[CHDK_scripting#print | print ]]||Y||Y||displays a line of text on console area of LCD screen |
|
| align="center" | [[CHDK_scripting#print | print ]]||Y||Y||displays a line of text on console area of LCD screen |
| |
|- |
|
|- |
| − |
| align="center" | [[CHDK_scripting#print_screen | print_screen ]]||Y||N||causes text written to screen to also be written to file on the SD card |
+ |
| align="center" | [[CHDK_scripting#print_screen | print_screen ]]||Y||Y||causes text written to screen to also be written to file on the SD card |
| |
|- |
|
|- |
| |
| align="center" | [[Script_commands#set_console_autoredraw | set_console_autoredraw ]]||Y||Y||enable or disable automatic rewrite/refresh of the console |
|
| align="center" | [[Script_commands#set_console_autoredraw | set_console_autoredraw ]]||Y||Y||enable or disable automatic rewrite/refresh of the console |
| Line 516: |
Line 523: |
| |
|- |
|
|- |
| |
| align="center" | [[Motion_Detection#Function_:_md_get_cell_diff| md_get_cell_diff ]]||Y||Y||gets change in motion detect level in specified cell |
|
| align="center" | [[Motion_Detection#Function_:_md_get_cell_diff| md_get_cell_diff ]]||Y||Y||gets change in motion detect level in specified cell |
| |
+ |
|- |
| |
+ |
| align="center" | [[Motion_Detection#Function_:_md_get_cell_val| md_get_cell_val ]]||Y||Y||gets signal level in specified cell |
| |
+ |
|- |
| |
+ |
| align="center" | [[Motion_Detection#Function_:_md_af_on_time| md_af_on_time ]]||Y||Y||enable AF led for MD response testing |
| |
|- |
|
|- |
| |
| align="left" style="color:#FFFFFF; background:#06718e;"|'''''USB Port Interface''''' |
|
| align="left" style="color:#FFFFFF; background:#06718e;"|'''''USB Port Interface''''' |
| Line 563: |
Line 574: |
| |
| align="left" style="background:#e6e1e4;"|'''Description''' |
|
| align="left" style="background:#e6e1e4;"|'''Description''' |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.scale ]]||Y||N||constant = 1000 |
+ |
| align="center" | [[Lua/Lua_Reference#Constants | imath.scale ]]||Y||N||constant = 1000 |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#Constants | imath.pi2 ]]||Y||N||constant = 6283 |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#Constants | imath.pi ]]||Y||N||constant = 3142 |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#Constants | imath.pi_2 ]]||Y||N||constant = 1517 |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#Multiplication and Division | imath.muldiv ]]||Y||N||a*b/c |
| |
+ |
|- |
| |
+ |
| align="center" | [[Lua/Lua_Reference#Multiplication and Division | imath.mul ]]||Y||N||a*b |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.pi2 ]]||Y||N||constant = 6283 |
+ |
| align="center" | [[Lua/Lua_Reference#Multiplication and Division | imath.div ]]||Y||N||a/b |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.pi ]]||Y||N||constant = 3142 |
+ |
| align="center" | [[Lua/Lua_Reference#Conversions( degrees <-> radians ) | imath.rad ]]||Y||N||rad -> deg |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.pi_2 ]]||Y||N||constant = 1517 |
+ |
| align="center" | [[Lua/Lua_Reference#Conversions( degrees <-> radians ) | imath.deg ]]||Y||N||deg -> rad |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.muldiv ]]||Y||N||a*b/c |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.sinr ]]||Y||N||sin(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.mul ]]||Y||N||a*b |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.cosr ]]||Y||N||cos(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.div ]]||Y||N||a/b |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.tanr ]]||Y||N||tan(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.rad ]]||Y||N||rad -> deg |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.asinr ]]||Y||N||arcsin(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.deg ]]||Y||N||deg -> rad |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.acosr ]]||Y||N||arccos(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.sinr ]]||Y||N||sin(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.atanr ]]||Y||N||arctan(rad) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.cosr ]]||Y||N||cos(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.polr ]]||Y||N||r, rad_alpha = pol(x, y) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.tanr ]]||Y||N||tan(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (radians) | imath.recr ]]||Y||N||x, y = rec(r, rad_alpha) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.asinr ]]||Y||N||arcsin(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.sind ]]||Y||N||sin(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.acosr ]]||Y||N||arccos(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.cosd ]]||Y||N||cos(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.atanr ]]||Y||N||arctan(rad) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.tand ]]||Y||N||tan(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.polr ]]||Y||N||r, rad_alpha = pol(x, y) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.asind ]]||Y||N||arcsin(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.recr ]]||Y||N||x, y = rec(r, rad_alpha) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.acosd ]]||Y||N||arccos(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.sind ]]||Y||N||sin(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.atand ]]||Y||N||arctan(deg) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.cosd ]]||Y||N||cos(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.pold ]]||Y||N||r, deg_alpha = pol(x, y) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.tand ]]||Y||N||tan(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Trigonometry (degrees) | imath.recd ]]||Y||N||x, y = rec(r, deg_alpha) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.asind ]]||Y||N||arcsin(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Logarithmic | imath.pow ]]||Y||N||x^y |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.acosd ]]||Y||N||arccos(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Logarithmic | imath.log ]]||Y||N||log(x) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.atand ]]||Y||N||arctan(deg) |
+ |
| align="center" | [[Lua/Lua_Reference#Logarithmic | imath.log2 ]]||Y||N||log2(x) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.pold ]]||Y||N||r, deg_alpha = pol(x, y) |
+ |
| align="center" | [[Lua/Lua_Reference#Logarithmic | imath.log10 ]]||Y||N||log10(x) |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.recd ]]||Y||N||x, y = rec(r, deg_alpha) |
+ |
| align="center" | [[Lua/Lua_Reference#Logarithmic | imath.sqrt ]]||Y||N||square root |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.pow ]]||Y||N||x^y |
+ |
| align="center" | [[Lua/Lua_Reference#Integer Conversion and Rounding| imath.int ]]||Y||N||integer |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.log ]]||Y||N||log(x) |
+ |
| align="center" | [[Lua/Lua_Reference#Integer Conversion and Rounding | imath.frac ]]||Y||N|| fractal |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.log2 ]]||Y||N||log2(x) |
+ |
| align="center" | [[Lua/Lua_Reference#Integer Conversion and Rounding | imath.ceil ]]||Y||N|| ceil |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.log10 ]]||Y||N||log10(x) |
+ |
| align="center" | [[Lua/Lua_Reference#Integer Conversion and Rounding | imath.floor ]]||Y||N||floor |
| |
|- |
|
|- |
| − |
| align="center" | [[Script_commands#Mathematical_functions_.28imath_library.29 | imath.sqrt ]]||Y||N||square root |
+ |
| align="center" | [[Lua/Lua_Reference#Integer Conversion and Rounding | imath.round ]]||Y||N||round |
| |
|- |
|
|- |
| |
| align="center" style="background:#C0C0f0;"| |
|
| align="center" style="background:#C0C0f0;"| |