[Tinyos-2-commits] CVS: tinyos-2.x/support/sdk/python tos.py, 1.8, 1.9

Razvan Musaloiu-E. razvanm at users.sourceforge.net
Tue Mar 17 12:30:29 PDT 2009


Update of /cvsroot/tinyos/tinyos-2.x/support/sdk/python
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18129/support/sdk/python

Modified Files:
	tos.py 
Log Message:
Increase the ack timeout for MIB600 to 0.5s.


Index: tos.py
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/python/tos.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tos.py	20 Feb 2009 10:06:38 -0000	1.8
--- tos.py	17 Mar 2009 19:30:26 -0000	1.9
***************
*** 68,74 ****
      source = comm.split('@')
      params = source[1].split(':')
      if source[0] == 'serial':
          try:
!             return Serial(params[0], int(params[1]), flush=True, debug=('--debug' in sys.argv))
          except:
              print "ERROR: Unable to initialize a serial connection to", comm
--- 68,75 ----
      source = comm.split('@')
      params = source[1].split(':')
+     debug = '--debug' in sys.argv
      if source[0] == 'serial':
          try:
!             return Serial(params[0], int(params[1]), flush=True, debug=debug)
          except:
              print "ERROR: Unable to initialize a serial connection to", comm
***************
*** 76,80 ****
      elif source[0] == 'network':
          try:
!             return SerialMIB600(params[0], int(params[1]), debug=False)
          except:
              print "ERROR: Unable to initialize a network connection to", comm
--- 77,81 ----
      elif source[0] == 'network':
          try:
!             return SerialMIB600(params[0], int(params[1]), debug=debug)
          except:
              print "ERROR: Unable to initialize a network connection to", comm
***************
*** 123,127 ****
  
  class SerialMIB600:
!     def __init__(self, host, port=10002, debug=False, readTimeout=None, ackTimeout=0.05):
          self.debug = debug
          self.readTimeout = readTimeout
--- 124,128 ----
  
  class SerialMIB600:
!     def __init__(self, host, port=10002, debug=False, readTimeout=None, ackTimeout=0.5):
          self.debug = debug
          self.readTimeout = readTimeout



More information about the Tinyos-2-commits mailing list