Commit 86cdb48c authored by Pierre Ynard's avatar Pierre Ynard

motion: log which sensor is used

parent a05aca78
......@@ -77,11 +77,13 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
motion->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
fclose( f );
motion->sensor = HDAPS_SENSOR;
msg_Dbg( obj, "HDAPS motion detection correctly loaded" );
}
else if( access( "/sys/devices/ams/x", R_OK ) == 0 )
{
/* Apple Motion Sensor support */
motion->sensor = AMS_SENSOR;
msg_Dbg( obj, "AMS motion detection correctly loaded" );
}
else if( access( "/sys/devices/platform/applesmc.768/position", R_OK ) == 0
&& ( f = fopen( "/sys/devices/platform/applesmc.768/calibrate", "r" ) ) )
......@@ -91,10 +93,12 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
motion->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
fclose( f );
motion->sensor = APPLESMC_SENSOR;
msg_Dbg( obj, "Apple SMC motion detection correctly loaded" );
}
#ifdef HAVE_MACOS_UNIMOTION
else if( (motion->unimotion_hw = detect_sms()) )
motion->sensor = UNIMOTION_SENSOR;
msg_Dbg( obj, "UniMotion motion detection correctly loaded" );
#endif
else
{
......@@ -107,7 +111,6 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
memset( motion->p_oldx, 0, sizeof( motion->p_oldx ) );
motion->i = 0;
motion->i_sum = 0;
msg_Dbg( obj, "Motion detection correctly loaded" );
return motion;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment