Benoît Allard  committed b287133

improve display, make unimportant message take less place

  • Participants
  • Parent commits aa6cbab
  • Branches default

Comments (0)

Files changed (2)

File python/antprotocol/

-import usb
+import usb, os, sys
 class ANTConnection(object):
     """ An abstract class that represents a connection """
 def getConn():
     for conn in [bc() for bc in CONNS]:
-            print "Found %s base" % (conn.NAME,)
+            os.write(sys.stdout.fileno(), "\n%s: " % conn.NAME)
             return conn
     print "Failed to find a base"
     return None

File python/antprotocol/

 # Added to and untwistedized and fixed up by Kyle Machulis <>
-import struct, array, time
+import struct, array, time, os, sys
 from message import MessageIN, MessageOUT
 class ANTException(Exception):
     def receive_bdcast(self):
         # FitBit device initialization
         for tries in range(60):
-            print "Waiting for beacon"
+            os.write(sys.stdout.fileno(), '.')
                 msg = self._receive_message()
             except NoMessageException:
             if == 0x4E:
-                print "Got it."
+                os.write(sys.stdout.fileno(), '!')
         raise FitBitBeaconTimeout("Timeout waiting for beacon, will restart")