QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Revision:
36:53b69e471b5a
Parent:
32:9cb7bc3fc9e0
Child:
41:df156ae5631b
--- a/packet.h	Wed Apr 23 01:43:17 2014 +0000
+++ b/packet.h	Wed Apr 23 03:31:16 2014 +0000
@@ -96,15 +96,18 @@
         }
     }
     
-    char rx_ready_with_timeout(){
-        if(outputDevice.readable()){
+    char rx_ready_with_timeout(Serial* serialDevice = NULL){
+        if(serialDevice == NULL){
+            serialDevice = &outputDevice;
+        }
+        if(serialDevice->readable()){
             return 1;
         }else{
             EvTimer t;
             t.set_s_period(3.0);
             t.start_timer();
             while(t.get_num_trips() == 0){
-                if(outputDevice.readable()){
+                if(serialDevice->readable()){
                     return 1;
                 }
             }