added filterForPacket method, as discussed with Hoder
[goodfet] / firmware / goodfet.c
index 90e4d0f..08ec8f5 100644 (file)
@@ -84,6 +84,9 @@ int main(void){
   unsigned long len;
   // MSP reboot count for reset input & reboot function located at 0xFFFE
   volatile unsigned int reset_count = 0;
+  
+  silent=0; //Don't trust globals.
+  
 #if (platform == tilaunchpad)
   int ret=0;
   
@@ -105,9 +108,13 @@ int main(void){
 #if (platform == donbfet)
   extern void donbfet_reboot(void);
   void (*reboot_function)(void) = donbfet_reboot;
+#elif (platform == zigduino)
+  extern void zigduino_reboot(void);
+  void (*reboot_function)(void) = zigduino_reboot;
 #else
   void (*reboot_function)(void) = (void *) 0xFFFE;
 #endif
+  
   init();
   
   txstring(MONITOR,OK,"http://goodfet.sf.net/");
@@ -144,9 +151,7 @@ int main(void){
     //Read data, looking for buffer overflow.
     if(len <= CMDDATALEN){
       for(i = 0; i < len; i++)
-       {
          cmddata[i] = serial_rx();
-       }
            
       handle(app,verb,len);
     }else {