Author: gwadavel
Date: 2008-12-23 13:35:02 +0100 (Tue, 23 Dec 2008)
New Revision: 3289

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
Log:
remove DEBUG
pitch = int(os.environ['tgp_pitch']

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
   2008-12-23 12:34:34 UTC (rev 3288)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
   2008-12-23 12:35:02 UTC (rev 3289)
@@ -63,7 +63,6 @@
 import os
 from time import sleep
 
-DEBUG = False
 LANGUAGE = ""
 
 FR = {"search": "Je commence la recherche", "stop": "La lumière maximum est 
ici",
@@ -77,16 +76,14 @@
     """ Search LANGUAGE in os.environ """
 
     global LANGUAGE
-    if DEBUG: 
-        print os.environ['tgp_language']
     
     if "fr" == os.environ['tgp_language']: 
         locutor = os.environ['tgp_locutor'] 
-        pitch = os.environ['tgp_pitch']
+        pitch = int(os.environ['tgp_pitch'])
         LANGUAGE = FR
     elif "en" == os.environ['tgp_language']:
         locutor = os.environ['tgp_locutor'] 
-        pitch = os.environ['tgp_pitch']
+        pitch = int(os.environ['tgp_pitch'])
         LANGUAGE = EN 
     else: # for other language
         locutor = "Ryan" 
@@ -128,10 +125,8 @@
        while tux.spinning.getLeftMovingState():
        # While tux spins
                lum = float(tux.status.requestOne('light_level')[0]) # Light
-               if DEBUG: print("Fonction search, Light : ", l)
                if lum > l_max: # Light Max ?
                        l_max = lum // 1
-                       if DEBUG: print("Fonction search, Light Max : ", l_max)
        return l_max # Return Light Max
 
 def stop(l_stop):
@@ -144,11 +139,9 @@
         tux.spinning.leftOnDuring(0.1, 2)
         sleep(0.1)
         lum = float(tux.status.requestOne('light_level')[0])
-        if DEBUG: print("Fonction stop, Light : ", l)
         if lum >= l_stop:
             tux.spinning.off()
             break
-    if DEBUG: print("I stop at : ", tux.status.requestOne('light_level')[0])
     message("stop")
     speak(str(int(lum)) + "%%")
 
@@ -172,7 +165,6 @@
         stop(light)    # stop
         tux.flippers.down()
     else:
-        if DEBUG: print("Unplugged the charger and restart")
         message("charger")
 tux.access.release()
 tux.server.disconnect()


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to