The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

Revision:
15:caa5a93a31d7
Parent:
14:2d609d465f00
Child:
16:73db7ef2deb6
diff -r 2d609d465f00 -r caa5a93a31d7 global.cpp
--- a/global.cpp	Sat Mar 26 17:52:34 2016 +0000
+++ b/global.cpp	Sat Mar 26 19:24:02 2016 +0000
@@ -30,4 +30,11 @@
 // Converts measurements from the QE2 to rads/sec
 float QE2RadsPerSec(short counts, short time) {    
     return ((float)counts*122.62)/time;
+}
+
+// Returns the last character
+char flushBuffer(void) { 
+    char ch;
+    while (pc.readable()) ch = pc.getc();
+    return ch; 
 }
\ No newline at end of file