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.
Diff: Accelerometer.cpp
- Revision:
- 6:754d21f44075
- Parent:
- 5:de016948db9c
- Child:
- 7:3b5aa5bea044
diff -r de016948db9c -r 754d21f44075 Accelerometer.cpp
--- a/Accelerometer.cpp Wed Mar 10 20:54:10 2021 +0000
+++ b/Accelerometer.cpp Wed Mar 10 23:55:48 2021 +0000
@@ -75,7 +75,7 @@
sort(a,a+n);
- return a[(int)n/2];
+ return a[(int)n/2]*mul;
}
//getAngle
@@ -95,7 +95,7 @@
sort(a,a+N_AVG);
- return a[(int)N_AVG/2]*mul;
+ return a[(int)N_AVG/2]*mul-curOffset;
}