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 ) ...@@ -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; motion->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
fclose( f ); fclose( f );
motion->sensor = HDAPS_SENSOR; motion->sensor = HDAPS_SENSOR;
msg_Dbg( obj, "HDAPS motion detection correctly loaded" );
} }
else if( access( "/sys/devices/ams/x", R_OK ) == 0 ) else if( access( "/sys/devices/ams/x", R_OK ) == 0 )
{ {
/* Apple Motion Sensor support */ /* Apple Motion Sensor support */
motion->sensor = AMS_SENSOR; motion->sensor = AMS_SENSOR;
msg_Dbg( obj, "AMS motion detection correctly loaded" );
} }
else if( access( "/sys/devices/platform/applesmc.768/position", R_OK ) == 0 else if( access( "/sys/devices/platform/applesmc.768/position", R_OK ) == 0
&& ( f = fopen( "/sys/devices/platform/applesmc.768/calibrate", "r" ) ) ) && ( f = fopen( "/sys/devices/platform/applesmc.768/calibrate", "r" ) ) )
...@@ -91,10 +93,12 @@ motion_sensors_t *motion_create( vlc_object_t *obj ) ...@@ -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; motion->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
fclose( f ); fclose( f );
motion->sensor = APPLESMC_SENSOR; motion->sensor = APPLESMC_SENSOR;
msg_Dbg( obj, "Apple SMC motion detection correctly loaded" );
} }
#ifdef HAVE_MACOS_UNIMOTION #ifdef HAVE_MACOS_UNIMOTION
else if( (motion->unimotion_hw = detect_sms()) ) else if( (motion->unimotion_hw = detect_sms()) )
motion->sensor = UNIMOTION_SENSOR; motion->sensor = UNIMOTION_SENSOR;
msg_Dbg( obj, "UniMotion motion detection correctly loaded" );
#endif #endif
else else
{ {
...@@ -107,7 +111,6 @@ motion_sensors_t *motion_create( vlc_object_t *obj ) ...@@ -107,7 +111,6 @@ motion_sensors_t *motion_create( vlc_object_t *obj )
memset( motion->p_oldx, 0, sizeof( motion->p_oldx ) ); memset( motion->p_oldx, 0, sizeof( motion->p_oldx ) );
motion->i = 0; motion->i = 0;
motion->i_sum = 0; motion->i_sum = 0;
msg_Dbg( obj, "Motion detection correctly loaded" );
return motion; 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