![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
arranged by katano
Dependencies: MPU9150_DMP Neon_F303K8 QuaternionMath iSDIO mbed-rtos mbed
Fork of Neon_F303K8 by
Diff: taskSensor.cpp
- Revision:
- 4:636bb3f66dcd
- Parent:
- 1:73543a1fbe62
diff -r 5f0d6133d34c -r 636bb3f66dcd taskSensor.cpp --- a/taskSensor.cpp Mon May 16 15:27:29 2016 +0000 +++ b/taskSensor.cpp Fri Aug 05 15:05:20 2016 +0000 @@ -63,7 +63,7 @@ // 以下の#if 0~#endifを#if 1~#endifに変更すると、シリアルからセンサーの出力データが出る // 加速度センサー生値 -#if 1 +#if 0 printf("%d, %d, %d\r\n", (int32_t)(((int32_t)buffer[34] << 24) + ((int32_t)buffer[35] << 16) + ((int32_t)buffer[36] << 8) + (int32_t)buffer[37]), (int32_t)(((int32_t)buffer[38] << 24) + ((int32_t)buffer[39] << 16) + ((int32_t)buffer[40] << 8) + (int32_t)buffer[41]), (int32_t)(((int32_t)buffer[42] << 24) + ((int32_t)buffer[43] << 16) + ((int32_t)buffer[44] << 8) + (int32_t)buffer[45])); @@ -74,13 +74,13 @@ (int32_t)(((int32_t)buffer[20] << 24) + ((int32_t)buffer[21] << 16) + ((int32_t)buffer[22] << 8) + (int32_t)buffer[23]), (int32_t)(((int32_t)buffer[24] << 24) + ((int32_t)buffer[25] << 16) + ((int32_t)buffer[26] << 8) + (int32_t)buffer[27])); #endif -#if 0 +#if 0 // 地磁気センサー生値 //pc.printf("%d, %d, %d\r\n", (int16_t)(buffer[29] << 8) + buffer[28], (int16_t)(buffer[31] << 8) + buffer[30], (int16_t)(buffer[33] << 8) + buffer[32]); #endif -#if 0 +#if 1 // センサーフュージョンによるQuartanion printf("%f, %f, %f, %f\r\n", (float)((((int32_t)buffer[0] << 24) + ((int32_t)buffer[1] << 16) + ((int32_t)buffer[2] << 8) + buffer[3]))* (1.0 / (1<<30)),