Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Diff: Accelerometer.cpp
- Revision:
- 46:fd5a62296b12
- Parent:
- 43:6251c0169f4f
--- a/Accelerometer.cpp Wed May 27 11:45:00 2015 +0000 +++ b/Accelerometer.cpp Wed May 27 13:01:43 2015 +0000 @@ -48,9 +48,9 @@ for (size_t i = 0; i < 6; i++) buffer[i] = read_reg(0x02 + i); */ - + read_reg(0x02, buffer, sizeof buffer); - + const int16_t x = *(reinterpret_cast<const int16_t*>(buffer + 0)) / 16; const int16_t y = *(reinterpret_cast<const int16_t*>(buffer + 2)) / 16; const int16_t z = *(reinterpret_cast<const int16_t*>(buffer + 4)) / 16;