Changeset 1183
- Timestamp:
- 05/09/11 06:20:24 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
Makefile (modified) (2 diffs)
-
core/luascript.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r1182 r1183 308 308 mv $(topdir)bin/$(VER)-s95-100e-$(BUILD_NUMBER).zip $(topdir)bin/s95-100e-$(BUILD_NUMBER)_BETA.zip 309 309 mv $(topdir)bin/$(VER)-s95-100h-$(BUILD_NUMBER).zip $(topdir)bin/s95-100h-$(BUILD_NUMBER)_BETA.zip 310 mv $(topdir)bin/$(VER)-ixus750_sd5 00-100h-$(BUILD_NUMBER).zip $(topdir)bin/$(VER)-ixus750_sd500-100h-$(BUILD_NUMBER)_BETA.zip310 mv $(topdir)bin/$(VER)-ixus750_sd550-100h-$(BUILD_NUMBER).zip $(topdir)bin/$(VER)-ixus750_sd550-100h-$(BUILD_NUMBER)_BETA.zip 311 311 @echo "**** Done Copying duplicate Firmwares" 312 312 @echo "**** Summary of memisosizes" … … 522 522 mv $(topdir)bin/s95-100h-$(BUILD_NUMBER)-full.zip $(topdir)bin/s95-100h-$(BUILD_NUMBER)-full_BETA.zip 523 523 mv $(topdir)bin/s95-100h-$(BUILD_NUMBER).zip $(topdir)bin/s95-100h-$(BUILD_NUMBER)_BETA.zip 524 mv $(topdir)bin/ixus750_sd5 00-100h-$(BUILD_NUMBER).zip $(topdir)bin/ixus750_sd500-100h-$(BUILD_NUMBER)_BETA.zip525 mv $(topdir)bin/ixus750_sd5 00-100h-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus750_sd500-100h-$(BUILD_NUMBER)-full_BETA.zip524 mv $(topdir)bin/ixus750_sd550-100h-$(BUILD_NUMBER).zip $(topdir)bin/ixus750_sd550-100h-$(BUILD_NUMBER)_BETA.zip 525 mv $(topdir)bin/ixus750_sd550-100h-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus750_sd550-100h-$(BUILD_NUMBER)-full_BETA.zip 526 526 @echo "**** Done Copying duplicate Firmwares" 527 527 @echo "**** Summary of memisosizes" -
trunk/core/luascript.c
r1178 r1183 16 16 #include "motion_detector.h" 17 17 #include "ptp.h" 18 #include "core.h" 18 19 19 20 #include "../lib/lua/lstate.h" // for L->nCcalls, baseCcalls … … 1671 1672 } 1672 1673 1674 static void register_func( lua_State* L, const char *name, void *func) { 1675 lua_pushcfunction( L, func ); 1676 lua_setglobal( L, name ); 1677 } 1678 1679 #define FUNC( X ) { #X, luaCB_##X }, 1680 static const luaL_Reg chdk_funcs[] = { 1681 FUNC(shoot) 1682 FUNC(sleep) 1683 FUNC(cls) 1684 FUNC(set_console_layout) 1685 FUNC(set_console_autoredraw) 1686 FUNC(console_redraw) 1687 FUNC(get_av96) 1688 FUNC(get_av96) 1689 FUNC(get_bv96) 1690 FUNC(get_day_seconds) 1691 FUNC(get_disk_size) 1692 FUNC(get_dof) 1693 FUNC(get_far_limit) 1694 FUNC(get_free_disk_space) 1695 FUNC(get_focus) 1696 FUNC(get_hyp_dist) 1697 FUNC(get_iso_market) 1698 FUNC(get_iso_mode) 1699 FUNC(get_iso_real) 1700 FUNC(get_jpg_count) 1701 FUNC(get_near_limit) 1702 FUNC(get_prop) 1703 FUNC(get_raw_count) 1704 FUNC(get_raw_nr) 1705 FUNC(get_raw) 1706 FUNC(get_sv96) 1707 FUNC(get_tick_count) 1708 FUNC(get_tv96) 1709 FUNC(get_user_av_id) 1710 FUNC(get_user_av96) 1711 FUNC(get_user_tv_id) 1712 FUNC(get_user_tv96) 1713 FUNC(get_vbatt) 1714 FUNC(get_zoom) 1715 FUNC(get_exp_count) 1716 FUNC(get_flash_params_count) 1717 FUNC(get_parameter_data) 1718 1719 FUNC(set_av96_direct) 1720 FUNC(set_av96) 1721 FUNC(set_focus) 1722 FUNC(set_iso_mode) 1723 FUNC(set_iso_real) 1724 FUNC(set_led) 1725 FUNC(set_nd_filter) 1726 FUNC(set_prop) 1727 FUNC(set_raw_nr) 1728 FUNC(set_raw) 1729 FUNC(set_sv96) 1730 FUNC(set_tv96_direct) 1731 FUNC(set_tv96) 1732 FUNC(set_user_av_by_id_rel) 1733 FUNC(set_user_av_by_id) 1734 FUNC(set_user_av96) 1735 FUNC(set_user_tv_by_id_rel) 1736 FUNC(set_user_tv_by_id) 1737 FUNC(set_user_tv96) 1738 FUNC(set_zoom_speed) 1739 FUNC(set_zoom_rel) 1740 FUNC(set_zoom) 1741 1742 FUNC(wait_click) 1743 FUNC(is_pressed) 1744 FUNC(is_key) 1745 #ifdef CAM_HAS_JOGDIAL 1746 FUNC(wheel_right) 1747 FUNC(wheel_left) 1748 #endif 1749 FUNC(md_get_cell_diff) 1750 FUNC(md_detect_motion) 1751 FUNC(autostarted) 1752 FUNC(get_autostart) 1753 FUNC(set_autostart) 1754 FUNC(get_usb_power) 1755 FUNC(exit_alt) 1756 FUNC(shut_down) 1757 FUNC(print_screen) 1758 1759 FUNC(get_focus_mode) 1760 FUNC(get_propset) 1761 FUNC(get_zoom_steps) 1762 FUNC(get_drive_mode) 1763 FUNC(get_flash_mode) 1764 FUNC(get_shooting) 1765 FUNC(get_flash_ready) 1766 FUNC(get_IS_mode) 1767 FUNC(set_ev) 1768 FUNC(get_ev) 1769 FUNC(get_orientation_sensor) 1770 FUNC(get_nd_present) 1771 FUNC(get_movie_status) 1772 FUNC(set_movie_status) 1773 1774 FUNC(get_histo_range) 1775 FUNC(shot_histo_enable) 1776 FUNC(play_sound) 1777 FUNC(get_temperature) 1778 FUNC(peek) 1779 FUNC(poke) 1780 FUNC(bitand) 1781 FUNC(bitor) 1782 FUNC(bitxor) 1783 FUNC(bitshl) 1784 FUNC(bitshri) 1785 FUNC(bitshru) 1786 FUNC(bitnot) 1787 1788 FUNC(get_time) 1789 1790 FUNC(get_buildinfo) 1791 FUNC(get_mode) 1792 1793 FUNC(set_raw_develop) 1794 // NOTE these functions normally run in the spytask. 1795 // called from lua they will run from kbd task instead 1796 FUNC(raw_merge_start) 1797 FUNC(raw_merge_add_file) 1798 FUNC(raw_merge_end) 1799 FUNC(set_backlight) 1800 FUNC(set_aflock) 1801 #ifdef OPT_CURVES 1802 FUNC(set_curve_state) 1803 #endif 1804 // get levent definition by name or id, nil if not found 1805 FUNC(get_levent_def) 1806 // get levent definition by index, nil if out of range 1807 FUNC(get_levent_def_by_index) 1808 // get levent index from name or ID 1809 FUNC(get_levent_index) 1810 FUNC(post_levent_to_ui) 1811 FUNC(post_levent_for_npt) 1812 FUNC(set_levent_active) 1813 FUNC(set_levent_script_mode) 1814 1815 FUNC(set_capture_mode) 1816 FUNC(set_capture_mode_canon) 1817 FUNC(is_capture_mode_valid) 1818 1819 FUNC(set_record) 1820 FUNC(switch_mode_usb) 1821 1822 #ifdef OPT_LUA_CALL_NATIVE 1823 FUNC(call_event_proc) 1824 FUNC(call_func_ptr) 1825 #endif 1826 FUNC(reboot) 1827 #ifdef CAM_CHDK_PTP 1828 FUNC(read_usb_msg) 1829 FUNC(write_usb_msg) 1830 #endif 1831 FUNC(get_meminfo) 1832 {NULL, NULL}, 1833 }; 1834 1673 1835 void register_lua_funcs( lua_State* L ) 1674 1836 { 1675 #define FUNC( X ) \ 1676 lua_pushcfunction( L, luaCB_##X ); \ 1677 lua_setglobal( L, #X ) 1678 1679 FUNC(shoot); 1680 FUNC(sleep); 1681 FUNC(cls); 1682 FUNC(set_console_layout); 1683 FUNC(set_console_autoredraw); 1684 FUNC(console_redraw); 1685 1837 const luaL_reg *r; 1686 1838 lua_pushlightuserdata( L, action_push_click ); 1687 1839 lua_pushcclosure( L, luaCB_keyfunc, 1 ); … … 1696 1848 lua_setglobal( L, "release" ); 1697 1849 1698 FUNC(get_av96); 1699 FUNC(get_av96); 1700 FUNC(get_bv96); 1701 FUNC(get_day_seconds); 1702 FUNC(get_disk_size); 1703 FUNC(get_dof); 1704 FUNC(get_far_limit); 1705 FUNC(get_free_disk_space); 1706 FUNC(get_focus); 1707 FUNC(get_hyp_dist); 1708 FUNC(get_iso_market); 1709 FUNC(get_iso_mode); 1710 FUNC(get_iso_real); 1711 FUNC(get_jpg_count); 1712 FUNC(get_near_limit); 1713 FUNC(get_prop); 1714 FUNC(get_raw_count); 1715 FUNC(get_raw_nr); 1716 FUNC(get_raw); 1717 FUNC(get_sv96); 1718 FUNC(get_tick_count); 1719 FUNC(get_tv96); 1720 FUNC(get_user_av_id); 1721 FUNC(get_user_av96); 1722 FUNC(get_user_tv_id); 1723 FUNC(get_user_tv96); 1724 FUNC(get_vbatt); 1725 FUNC(get_zoom); 1726 FUNC(get_exp_count); 1727 FUNC(get_flash_params_count); 1728 FUNC(get_parameter_data); 1729 1730 FUNC(set_av96_direct); 1731 FUNC(set_av96); 1732 FUNC(set_focus); 1733 FUNC(set_iso_mode); 1734 FUNC(set_iso_real); 1735 FUNC(set_led); 1736 FUNC(set_nd_filter); 1737 FUNC(set_prop); 1738 FUNC(set_raw_nr); 1739 FUNC(set_raw); 1740 FUNC(set_sv96); 1741 FUNC(set_tv96_direct); 1742 FUNC(set_tv96); 1743 FUNC(set_user_av_by_id_rel); 1744 FUNC(set_user_av_by_id); 1745 FUNC(set_user_av96); 1746 FUNC(set_user_tv_by_id_rel); 1747 FUNC(set_user_tv_by_id); 1748 FUNC(set_user_tv96); 1749 FUNC(set_zoom_speed); 1750 FUNC(set_zoom_rel); 1751 FUNC(set_zoom); 1752 1753 FUNC(wait_click); 1754 FUNC(is_pressed); 1755 FUNC(is_key); 1756 #ifdef CAM_HAS_JOGDIAL 1757 FUNC(wheel_right); 1758 FUNC(wheel_left); 1759 #endif 1760 FUNC(md_get_cell_diff); 1761 FUNC(md_detect_motion); 1762 FUNC(autostarted); 1763 FUNC(get_autostart); 1764 FUNC(set_autostart); 1765 FUNC(get_usb_power); 1766 FUNC(exit_alt); 1767 FUNC(shut_down); 1768 FUNC(print_screen); 1769 1770 FUNC(get_focus_mode); 1771 FUNC(get_propset); 1772 FUNC(get_zoom_steps); 1773 FUNC(get_drive_mode); 1774 FUNC(get_flash_mode); 1775 FUNC(get_shooting); 1776 FUNC(get_flash_ready); 1777 FUNC(get_IS_mode); 1778 FUNC(set_ev); 1779 FUNC(get_ev); 1780 FUNC(get_orientation_sensor); 1781 FUNC(get_nd_present); 1782 FUNC(get_movie_status); 1783 FUNC(set_movie_status); 1784 1785 FUNC(get_histo_range); 1786 FUNC(shot_histo_enable); 1787 FUNC(play_sound); 1788 FUNC(get_temperature); 1789 FUNC(peek); 1790 FUNC(poke); 1791 FUNC(bitand); 1792 FUNC(bitor); 1793 FUNC(bitxor); 1794 FUNC(bitshl); 1795 FUNC(bitshri); 1796 FUNC(bitshru); 1797 FUNC(bitnot); 1798 1799 FUNC(get_time); 1800 1801 FUNC(get_buildinfo); 1802 FUNC(get_mode); 1803 1804 FUNC(set_raw_develop); 1805 // NOTE these functions normally run in the spytask. 1806 // called from lua they will run from kbd task instead 1807 FUNC(raw_merge_start); 1808 FUNC(raw_merge_add_file); 1809 FUNC(raw_merge_end); 1810 FUNC(set_backlight); 1811 FUNC(set_aflock); 1812 #ifdef OPT_CURVES 1813 FUNC(set_curve_state); 1814 #endif 1815 // get levent definition by name or id, nil if not found 1816 FUNC(get_levent_def); 1817 // get levent definition by index, nil if out of range 1818 FUNC(get_levent_def_by_index); 1819 // get levent index from name or ID 1820 FUNC(get_levent_index); 1821 FUNC(post_levent_to_ui); 1822 FUNC(post_levent_for_npt); 1823 FUNC(set_levent_active); 1824 FUNC(set_levent_script_mode); 1825 1826 FUNC(set_capture_mode); 1827 FUNC(set_capture_mode_canon); 1828 FUNC(is_capture_mode_valid); 1829 1830 FUNC(set_record); 1831 1832 FUNC(switch_mode_usb); 1833 1834 #ifdef OPT_LUA_CALL_NATIVE 1835 FUNC(call_event_proc); 1836 FUNC(call_func_ptr); 1837 #endif 1838 FUNC(reboot); 1850 for(r=chdk_funcs;r->name;r++) { 1851 lua_pushcfunction( L, r->func ); 1852 lua_setglobal( L, r->name ); 1853 } 1839 1854 #ifdef CAM_CHDK_PTP 1840 FUNC(read_usb_msg);1841 FUNC(write_usb_msg);1842 1855 luaL_dostring(L,"function usb_msg_table_to_string(t)" 1843 1856 " local v2s=function(v)" … … 1863 1876 1864 1877 #endif 1865 FUNC(get_meminfo); 1866 } 1878 }
Note: See TracChangeset
for help on using the changeset viewer.