played around with different inputs to change the temperature display
[goodfet] / client / GoodFET.py
index 3d2d91b..11ca616 100755 (executable)
@@ -195,17 +195,17 @@ class GoodFET:
                 #print "'%s'!=\n'%s'" % (self.data,"http://goodfet.sf.net/");
                 if attemptlimit is not None and attempts >= attemptlimit:
                     return
-                elif attempts==2:
+                elif attempts==2 and os.environ.get("board")!='telosb':
                     print "See the GoodFET FAQ about missing info flash.";
                     self.serialport.setTimeout(0.2);
                 #self.serialport.flushInput()
                 #self.serialport.flushOutput()
                 
                 #TelosB reset, prefer software to I2C SPST Switch.
-                if (os.environ.get("platform")=='telosb' or  os.environ.get("board")=='telosb'):
+                if (os.environ.get("board")=='telosb'):
                     #print "TelosB Reset";
                     self.telosBReset();
-                elif (os.environ.get("board")=='zolertiaz1' or  os.environ.get("board")=='z1'):
+                elif (os.environ.get("board")=='z1'):
                     self.bslResetZ1(invokeBSL=0);
                 elif (os.environ.get("board")=='apimote1') or (os.environ.get("board")=='apimote'):
                     #Explicitly set RTS and DTR to halt board.
@@ -247,8 +247,8 @@ class GoodFET:
                     if self.verbose:
                         print "Comm error on %i try, resyncing out of %s." % (foo,
                                                                               clocking);
-                        connected=0;
-                        break;
+                    connected=0;
+                    break;
         if self.verbose: print "Connected after %02i attempts." % attempts;
         self.mon_connected();
         self.serialport.setTimeout(12);
@@ -671,7 +671,8 @@ class GoodFET:
         data="The quick brown fox jumped over the lazy dog.";
         self.writecmd(self.MONITORAPP,0x81,len(data),data);
         if self.data!=data:
-            print "Comm error recognized by monitorecho(), got:\n%s" % self.data;
+            if self.verbose:
+                print "Comm error recognized by monitorecho(), got:\n%s" % self.data;
             return 0;
         return 1;