QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Revision:
19:8c1f2a2204fb
Parent:
18:e72ee7aed088
Child:
20:81d5655fecc2
--- a/main.cpp	Sun Apr 20 08:04:37 2014 +0000
+++ b/main.cpp	Sun Apr 20 22:01:05 2014 +0000
@@ -145,26 +145,20 @@
     __disable_irq();
     XBEE::getTCPInterrupt().fall(&connection_lost);
     
-    getPS().wait_for_egg();
+    getPS().openConnection();
+    getPS().closeConnection();
     //for(int a=0;a<1000000000;a++);
     while(1){
-        //while(1){
-//            USB::getSerial().printf("sending 0's\n");
-//            getPS().openConnection();
-//            USB::getSerial().printf("connection open!\r\n");
-//            for(int b=0;b<50;b++){
-//                for(int a=0;a<sizeof(PacketStruct)-1;a++){
-//                    while(!getPS().outputDevice.writeable()){}
-//                    getPS().outputDevice.putc(0);
-//                }
-//                while(!getPS().outputDevice.writeable()){}
-//                getPS().outputDevice.putc(0xFF);
-//            }
-//            USB::getSerial().printf("sent all data\r\n");
-//            //for(int a=0;a<10000000;a++);
-//            getPS().closeConnection();
-//            //for(int a=0;a<10000000;a++);
-//        }
+        while(1){
+            USB::getSerial().printf("sending 0's\n");
+            //getPS().openConnection();
+            USB::getSerial().printf("connection open!\r\n");
+            imageHand.run();
+            USB::getSerial().printf("sent all data\r\n");
+            //for(int a=0;a<10000000;a++);
+            //getPS().closeConnection();
+            //for(int a=0;a<10000000;a++);
+        }
 
         // Run image handler
         USB::getSerial().printf("Check Image\n");