Author: jerome
Date: 2009-05-07 12:26:46 +0200 (Thu, 07 May 2009)
New Revision: 4650

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
Log:
* Updated delays between two statuses requests.

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
   2009-05-07 09:55:43 UTC (rev 4649)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
   2009-05-07 10:26:46 UTC (rev 4650)
@@ -85,7 +85,7 @@
     '''
     Start tux spinning.
     '''
-    tux.spinning.leftOn(4.0, speed = SPV_SLOW);
+    tux.spinning.leftOn(2.0, speed = SPV_SLOW);
 
     
     
@@ -101,7 +101,7 @@
     thread.start()
     
     # wait Tux began to turn
-    sleep(1.0) 
+    sleep(1.5) 
     
     isTurning = tux.status.requestOne(ST_NAME_SPIN_LEFT_MOTOR_ON)[0]
     
@@ -114,7 +114,7 @@
         
         lum = float(tux.status.requestOne('light_level')[0]) # Light
         
-        sleep(0.25)
+        sleep(0.1)
         
         if lum > l_max: # Light Max ?
             l_max = lum // 1
@@ -131,17 +131,18 @@
     monitor gadget for TuxDroid V1 Tux turn a little, wait and turn while 
light < light max 
     '''
     brk = False
+    l_stop = l_stop - 4.0  #Because of Windblows.
     while 1:
         
         tux.spinning.leftOnDuring(0.1, speed=SPV_VERYSLOW)
-        sleep(0.4)
+        sleep(1.0)
         lum = float(tux.status.requestOne('light_level')[0])
        
         if lum >= l_stop:
             tux.spinning.off()
             break
             
-        if (int(time()) - currentTime) >= 20:
+        if (int(time()) - currentTime) >= 30:
             GadgetHelper.throwMessage("Sorry I'm not sure where the most of 
the light is coming from")
             tux.spinning.off()
             brk = True


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to