X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=3bea6020c04f230652a4b355f7933bdff6e3be34;hp=1ef6171e5770a1c3fe2b39d5672702c5c17cd5b8;hb=0a80646c9c1732fa8ec74e33de1ebd3afe5eb9cd;hpb=f7602f756c1fec1877b667296bae7c2a19e9cdb0 diff --git a/client/GoodFET.py b/client/GoodFET.py index 1ef6171..3bea602 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -103,6 +103,7 @@ class GoodFET: connected=0; while connected==0: while self.verb!=0x7F or self.data!="http://goodfet.sf.net/": + #print "Resyncing."; self.serialport.flushInput() self.serialport.flushOutput() #Explicitly set RTS and DTR to halt board. @@ -112,16 +113,17 @@ class GoodFET: self.serialport.setDTR(0); self.serialport.flushInput() self.serialport.flushOutput() - #time.sleep(.1); + #time.sleep(60); attempts=attempts+1; self.readcmd(); #Read the first command. #Here we have a connection, but maybe not a good one. connected=1; olds=self.infostring(); - self.monitorclocking(); + clocking=self.monitorclocking(); for foo in range(1,30): if not self.monitorecho(): - print "Comm error, resyncing."; + if self.verbose: print "Comm error on %i try, resyncing out of %s." % (foo, + clocking); connected=0; break; if self.verbose: print "Connected after %02i attempts." % attempts; @@ -347,7 +349,7 @@ class GoodFET: data="The quick brown fox jumped over the lazy dog."; self.writecmd(self.MONITORAPP,0x81,len(data),data); if self.data!=data: - if verbose: print "Comm error recognized."; + if self.verbose: print "Comm error recognized by monitorecho()."; return 0; return 1; def monitorclocking(self):