[vlc-commits] motion: log which sensor is used

Pierre Ynard git at videolan.org
Sun Oct 14 18:45:09 CEST 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun Oct 14 18:44:37 2012 +0200| [86cdb48c2eddd02667b12211c76ee71567a289b2] | committer: Pierre Ynard

motion: log which sensor is used

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86cdb48c2eddd02667b12211c76ee71567a289b2
---

 modules/control/motionlib.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/control/motionlib.c b/modules/control/motionlib.c
index 87d40ff..505f42b 100644
--- a/modules/control/motionlib.c
+++ b/modules/control/motionlib.c
@@ -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;
 }
 



More information about the vlc-commits mailing list