fix compile error
authorsvnhieber <svnhieber@f8795833-4959-0410-8ae9-8bcb0cfab428>
Tue, 11 Jan 2011 17:04:23 +0000 (17:04 +0000)
committersvnhieber <svnhieber@f8795833-4959-0410-8ae9-8bcb0cfab428>
Tue, 11 Jan 2011 17:04:23 +0000 (17:04 +0000)
git-svn-id: https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/pc_apps/roomba_tests@4002 f8795833-4959-0410-8ae9-8bcb0cfab428

main.cc

diff --git a/main.cc b/main.cc
index 3eb6874..09bf40b 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -88,10 +88,10 @@ struct SensorData {
 int nearest_diff(unsigned short last, unsigned short current) {
   int d = current - last;
   if(d < -0x8000) { // overflow in positive direction
 int nearest_diff(unsigned short last, unsigned short current) {
   int d = current - last;
   if(d < -0x8000) { // overflow in positive direction
-    d = (0x10000 - last_i + this_i);
+    d = (0x10000 - last + current);
   }
   if(d >= 0x8000) { // overflow in negative direction
   }
   if(d >= 0x8000) { // overflow in negative direction
-    d = -(0x10000 - this_i + last_i);
+    d = -(0x10000 - current + last);
   }
 }
 
   }
 }
 
This page took 0.034841 seconds and 4 git commands to generate.