mylibrary

Files at this revision

API Documentation at this revision

Comitter:
gaku_sigu
Date:
Thu May 11 12:55:05 2017 +0000
Parent:
9:1c0640c61fce
Commit message:
Acc corrected

Changed in this revision

Nunchuck/Nunchuck.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Nunchuck/Nunchuck.cpp	Thu May 11 11:04:30 2017 +0000
+++ b/Nunchuck/Nunchuck.cpp	Thu May 11 12:55:05 2017 +0000
@@ -113,7 +113,7 @@
     int temp = data[2] << 2;
     if ((data[5] >> 2) & 1) temp += 2;
     if ((data[5] >> 3) & 1) temp += 1;
-    return data[2];
+    return temp;
 }
 
 
@@ -123,7 +123,7 @@
     int temp = data[3] << 2;
     if ((data[5] >> 4) & 1) temp += 2;
     if ((data[5] >> 5) & 1) temp += 1;
-    return data[3];
+    return temp;
 }
 
 
@@ -133,7 +133,7 @@
     int temp = data[4] << 2;
     if ((data[5] >> 6) & 1) temp += 2;
     if ((data[5] >> 7) & 1) temp += 1;
-    return data[4];
+    return temp;
 }