za

Fork of m3pi by Chris Styles

Revision:
2:330eb028e85b
Parent:
1:816a80dcc1a3
Child:
3:c38d2f980494
diff -r 816a80dcc1a3 -r 330eb028e85b m3pi.cpp
--- a/m3pi.cpp	Fri Oct 29 13:30:11 2010 +0000
+++ b/m3pi.cpp	Mon Nov 01 16:18:55 2010 +0000
@@ -101,7 +101,7 @@
     pos = _ser.getc();
     pos += _ser.getc() << 8;
     
-    float fpos = (pos - 2048)/2048;
+    float fpos = ((float)pos - 2048.0)/2048.0;
     return(fpos);
 }