The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

Revision:
7:5ef312aa2678
Parent:
6:52686c25e4af
Child:
9:62fbb69b612c
--- a/global.cpp	Fri Mar 25 15:18:33 2016 +0000
+++ b/global.cpp	Fri Mar 25 19:34:16 2016 +0000
@@ -28,12 +28,6 @@
 InterruptIn bumper(p25);
 
 // Converts measurements from the QE2 to rads/sec
-float QE2RadsPerSec(short counts, short time) {  
-    int cnt32;   
-    if (counts & 0x00008000) {
-        cnt32 = counts | 0xFFFF0000;
-    } else {
-        cnt32 = counts;
-    }   
-    return (cnt32*122.62)/time;
+float QE2RadsPerSec(short counts, short time) {    
+    return ((float)counts*122.62)/time;
 }
\ No newline at end of file