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.
Fork of MPU6050 by
Diff: MPU6050.cpp
- Revision:
- 1:a3366f09e95c
- Parent:
- 0:6757f7363a9f
diff -r 6757f7363a9f -r a3366f09e95c MPU6050.cpp
--- a/MPU6050.cpp Wed Jul 11 12:26:47 2012 +0000
+++ b/MPU6050.cpp Mon Sep 10 21:22:39 2012 +0000
@@ -196,22 +196,22 @@
void MPU6050::getGyro( float *data ) {
int temp[3];
this->getGyroRaw(temp);
- if (currentAcceleroRange == MPU6050_GYRO_RANGE_250) {
+ if (currentGyroRange == MPU6050_GYRO_RANGE_250) {
data[0]=(float)temp[0] / 7505.7;
data[1]=(float)temp[1] / 7505.7;
data[2]=(float)temp[2] / 7505.7;
}
- if (currentAcceleroRange == MPU6050_GYRO_RANGE_500){
+ if (currentGyroRange == MPU6050_GYRO_RANGE_500){
data[0]=(float)temp[0] / 3752.9;
data[1]=(float)temp[1] / 3752.9;
data[2]=(float)temp[2] / 3752.9;
}
- if (currentAcceleroRange == MPU6050_GYRO_RANGE_1000){
+ if (currentGyroRange == MPU6050_GYRO_RANGE_1000){
data[0]=(float)temp[0] / 1879.3;;
data[1]=(float)temp[1] / 1879.3;
data[2]=(float)temp[2] / 1879.3;
}
- if (currentAcceleroRange == MPU6050_GYRO_RANGE_2000){
+ if (currentGyroRange == MPU6050_GYRO_RANGE_2000){
data[0]=(float)temp[0] / 939.7;
data[1]=(float)temp[1] / 939.7;
data[2]=(float)temp[2] / 939.7;
