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.
Dependents: Aigamozu_Robot_March
Revision 3:00c23c8ff4d8, committed 2016-02-16
- Comitter:
- s1200058
- Date:
- Tue Feb 16 09:38:53 2016 +0000
- Parent:
- 2:b03a80d9eade
- Commit message:
- for calibration compass;
Changed in this revision
| setting.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/setting.cpp Wed Jan 27 12:15:05 2016 +0000
+++ b/setting.cpp Tue Feb 16 09:38:53 2016 +0000
@@ -31,14 +31,8 @@
void setting::setAngle(double angle){
- if(changeFlag != 0){
- pastGpsAngle = gpsAngle;
+
gpsAngle = angle;
- difAngle = gpsAngle - pastGpsAngle;
- }
- else{
- gpsAngle = angle;
- }
}
@@ -76,15 +70,15 @@
*/
- if(flag <= 20){
+/* if(flag <= 20){
caribCmp.x += x;
caribCmp.y += y;
caribCmp.z += z;
-
+ */
agzCmp.x = x;
agzCmp.y = y;
agzCmp.z = z;
- }
+/* }
else{
@@ -99,7 +93,7 @@
caribCmp.y /= 20;
caribCmp.z /= 20;
}
-
+ */
}
@@ -174,7 +168,7 @@
}
}
*/
- if(flag <= 20){
+/* if(flag <= 20){
caribGyr.x += x;
caribGyr.y += y;
caribGyr.z += z;
@@ -201,5 +195,9 @@
caribGyr.y /= 20;
caribGyr.z /= 20;
}
-
+*/
+ agzGyr.x = x;
+ agzGyr.y = y;
+ agzGyr.z = z;
+
}