@@ -136,6 +136,7 @@ def __init__(self, host, port = 7765):
136136 first_status .dump ()
137137
138138 def begin (self , lwm , rate ):
139+ print 'begin()'
139140 cmd = struct .pack ("<cHI" , "b" , lwm , rate )
140141 self .conn .sendall (cmd )
141142 return self .readresp ("b" )
@@ -154,22 +155,24 @@ def encode_point(self, point):
154155 raise e
155156
156157 def write (self , points ):
158+ print 'write()'
157159 epoints = map (self .encode_point , points )
158160 cmd = struct .pack ("<cH" , "d" , len (epoints ))
159161 data = cmd + "" .join (epoints )
160162 npoints = len (points )
161163 ldata = len (data )
162164 avg = ldata / npoints
163165
164- print 'write() length: %d, num points: %d' % (len (data ), len (points ))
165- print 'Length per point: %d' % avg
166- print 'Length encoded points: %d' % len (epoints [0 ])
167- print 'Length command: %d' % len (cmd )
166+ # print 'write() length: %d, num points: %d' % (len(data), len(points))
167+ # print 'Length per point: %d' % avg
168+ # print 'Length encoded points: %d' % len(epoints[0])
169+ # print 'Length command: %d' % len(cmd)
168170
169171 self .conn .sendall (data )
170172 return self .readresp ("d" )
171173
172174 def prepare (self ):
175+ print 'prepare()'
173176 self .conn .sendall ("p" )
174177 return self .readresp ("p" )
175178
@@ -216,6 +219,7 @@ def play_stream(self, stream):
216219 if not started :
217220 self .begin (0 , 30000 )
218221 started = 1
222+ print 'started now'
219223
220224
221225def find_dac ():
0 commit comments