History

Removed unused variables, added motion driver library for OS X.

Andrzej Kapolka committed 13 years ago

Commit 6a5fb4f1 parent 53eb5ed2 files · +1 −3Browse files

Showing the changes to interface/src/SerialInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/SerialInterface.cpp+2−4
@@ -200,7 +200,7 @@ void SerialInterface::readData(float deltaTime) { · 199 unmodified lines
200 200
201 // ask the invensense for raw gyro data201 // ask the invensense for raw gyro data
202 short accelData[3];202 short accelData[3];
203 int r1 = mpu_get_accel_reg(accelData, 0);203 mpu_get_accel_reg(accelData, 0);
204 204
205 const float LSB_TO_METERS_PER_SECOND2 = 1.f / 16384.f * GRAVITY_EARTH;205 const float LSB_TO_METERS_PER_SECOND2 = 1.f / 16384.f * GRAVITY_EARTH;
206 // From MPU-9150 register map, with setting on206 // From MPU-9150 register map, with setting on
@@ -208,10 +208,8 @@ void SerialInterface::readData(float deltaTime) { · 1 unmodified line
208 208
209 _lastAcceleration = glm::vec3(-accelData[2], -accelData[1], -accelData[0]) * LSB_TO_METERS_PER_SECOND2;209 _lastAcceleration = glm::vec3(-accelData[2], -accelData[1], -accelData[0]) * LSB_TO_METERS_PER_SECOND2;
210 210
211 int rollRate, yawRate, pitchRate;
212
213 short gyroData[3];211 short gyroData[3];
214 int r2 = mpu_get_gyro_reg(gyroData, 0);212 mpu_get_gyro_reg(gyroData, 0);
215 213
216 // Convert the integer rates to floats214 // Convert the integer rates to floats
217 const float LSB_TO_DEGREES_PER_SECOND = 1.f / 16.4f; // From MPU-9150 register map, 2000 deg/sec.215 const float LSB_TO_DEGREES_PER_SECOND = 1.f / 16.4f; // From MPU-9150 register map, 2000 deg/sec.