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.
Dependencies: mbed mbed-rtos Motor
Revision 20:6b5f83412413, committed 2020-04-23
- Comitter:
- lrucker7
- Date:
- Thu Apr 23 15:58:39 2020 +0000
- Parent:
- 19:9ea181b003af
- Child:
- 21:949558e7a48c
- Commit message:
- comment atan2;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 23 15:56:22 2020 +0000
+++ b/main.cpp Thu Apr 23 15:58:39 2020 +0000
@@ -142,7 +142,7 @@
for(int i = 0; i < 500; i++){
imu.readGyro();
angleBiasGyro += imu.calcGyro(imu.gy);
- angleBiasAcc += (-1)*atan2(imu.ax,imu.az)*180/3.142-90
+ //angleBiasAcc += (-1)*atan2(imu.ax,imu.az)*180/3.142-90
}
angleBiasGyro /= 500;
angleBiasAcc /= 500;
@@ -152,7 +152,7 @@
// return;
imu.readGyro();
int gyro = -(imu.calcGyro(imu.gy)-angleBiasGyro) * .01;
- int acc = (-1)*atan2(imu.ax,imu.az)*180/3.142-90-angleBiasAcc;
+ //int acc = (-1)*atan2(imu.ax,imu.az)*180/3.142-90-angleBiasAcc;
//pc.printf("gyro:%f",gyro);
angleMutex.lock();
pAngle += 1*gyro //+ 0.02*acc;
