Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 10:d0b1160ee5c2, committed 2017-05-11
- 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;
 }