Author: jaguarondi
Date: 2008-08-20 09:48:18 +0200 (Wed, 20 Aug 2008)
New Revision: 1557

Modified:
   firmware/tuxcore/trunk/motors.c
Log:
* Added a protection timeout on the eyes motor.


Modified: firmware/tuxcore/trunk/motors.c
===================================================================
--- firmware/tuxcore/trunk/motors.c     2008-08-20 07:09:13 UTC (rev 1556)
+++ firmware/tuxcore/trunk/motors.c     2008-08-20 07:48:18 UTC (rev 1557)
@@ -45,6 +45,8 @@
  * in the close position. There's no need to brake the motor when opening the
  * eyes with this gearbox design. */
 #define EYES_BRAKING_DLY 4
+/** Protection timeout for the eyes. */
+#define EYES_TIMEOUT 100
 /** Delay during which the motor is inverted when braking the mouth to stop it
  * in the open or close position. */
 #define MOUTH_BRAKING_DLY 8
@@ -349,7 +351,7 @@
 {
     gStatus.mot |= GSTATUS_MOT_EYES;
     eyes_move_counter = cnt;
-    //eyes_stop_delay = 0;
+    eyes_stop_delay = EYES_TIMEOUT;
     run_eyes_motor();
 }
 
@@ -444,6 +446,7 @@
     if (eyes_move_counter)
     {
         eyes_move_counter--;
+        eyes_stop_delay = EYES_TIMEOUT;
         if (!eyes_move_counter)
         {
             stop_eyes_motor();


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to