Changeset 153


Ignore:
Timestamp:
Jul 15, 2010, 8:21:48 PM (14 years ago)
Author:
Rick van der Zwet
Message:

Some hacks to make it work better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/serial-sniffer.py

    r148 r153  
    3939
    4040
    41 send = open('/dev/ttyUSB0','r', buffering=0)
    42 recv = open('/dev/ttyUSB1','r', buffering=0)
     41send = open('/dev/ttyUSB0','rb', buffering=0)
     42recv = open('/dev/ttyUSB1','rb', buffering=0)
    4343comment = open('/dev/stdin','r', buffering=0)
    4444
     
    6262    while send_buffer == "" or recv_buffer == "":
    6363      if send_buffer == "":
    64         # pdebug("trying to read send_buffer")
     64        pdebug("trying to read send_buffer")
    6565        while 1:
    6666          try:
     
    6868              send_buffer += send.read(1)
    6969          except Watchdog:
     70            pdebug("trying to read send_buffer")
    7071            break
    7172      else:
     
    7374 
    7475      if recv_buffer == "":
    75         # pdebug("trying to read recv_buffer")
     76        pdebug("trying to read recv_buffer")
    7677        while 1:
    7778          try:
Note: See TracChangeset for help on using the changeset viewer.