Ignore:
Timestamp:
01/16/12 08:22:51 (17 months ago)
Author:
philmoz
Message:

Update trunk with latest changes from reyalp-flt branch.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/core/luascript.c

    r1527 r1569  
    1414#include "console.h" 
    1515#include "action_stack.h" 
    16 #include "motion_detector.h" 
    1716#include "ptp.h" 
    1817#include "core.h" 
     
    779778static int luaCB_md_get_cell_diff( lua_State* L ) 
    780779{ 
    781   lua_pushnumber( L, md_get_cell_diff(luaL_checknumber(L,1), 
    782                                       luaL_checknumber(L,2))); 
    783   return 1; 
     780    if (module_mdetect_load()) 
     781        lua_pushnumber( L, libmotiondetect->md_get_cell_diff(luaL_checknumber(L,1), luaL_checknumber(L,2))); 
     782    else 
     783        lua_pushnumber( L, 0 ); 
     784    return 1; 
    784785} 
    785786 
     
    803804  int pixels_step = (luaL_optnumber(L,15,6)); 
    804805  int msecs_before_trigger = (luaL_optnumber(L,16,0)); 
    805   if(md_init_motion_detector( 
     806  if (module_mdetect_load() && libmotiondetect->md_init_motion_detector( 
    806807    columns, rows, pixel_measure_mode, detection_timeout,  
    807808    measure_interval, threshold, draw_grid, 
     
    825826    kbd_reset_autoclicked_key(); 
    826827 
     828    // Push selected file as script return value 
    827829        lua_pushstring( Lt, (fn && fn[0])? fn : NULL ); 
    828  
    829830} 
    830831 
Note: See TracChangeset for help on using the changeset viewer.