From c1da0aee34acefdc9ca22cfb129a88c184d33ef8 Mon Sep 17 00:00:00 2001 From: Lakshman Kumar K N Date: Wed, 2 Nov 2016 21:48:37 -0400 Subject: [PATCH 1/2] Correct a bug in param group naming --- src/modules/src/sensors_stock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/src/sensors_stock.c b/src/modules/src/sensors_stock.c index 380f8fe31b..4f1df9106f 100644 --- a/src/modules/src/sensors_stock.c +++ b/src/modules/src/sensors_stock.c @@ -88,4 +88,4 @@ PARAM_ADD(PARAM_UINT32, t, &position.timestamp) PARAM_ADD(PARAM_FLOAT, x, &position.x) PARAM_ADD(PARAM_FLOAT, y, &position.y) PARAM_ADD(PARAM_FLOAT, z, &position.z) -PARAM_GROUP_STOP(sensorfusion6) +PARAM_GROUP_STOP(lps) From 03cf9ff9db45ab3640e23fed351e532c8658d2b5 Mon Sep 17 00:00:00 2001 From: Lakshman Kumar K N Date: Thu, 3 Nov 2016 08:53:51 -0400 Subject: [PATCH 2/2] Create a log group for sensfusion6 variables --- src/modules/src/sensfusion6.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/src/sensfusion6.c b/src/modules/src/sensfusion6.c index 7da340c972..7dd1d83e5c 100644 --- a/src/modules/src/sensfusion6.c +++ b/src/modules/src/sensfusion6.c @@ -26,6 +26,7 @@ #include #include "sensfusion6.h" +#include "log.h" #include "param.h" #define M_PI_F ((float) M_PI) @@ -306,6 +307,18 @@ static void estimatedGravityDirection(float* gx, float* gy, float* gz) *gz = q0 * q0 - q1 * q1 - q2 * q2 + q3 * q3; } +LOG_GROUP_START(sensorfusion6) + LOG_ADD(LOG_FLOAT, qw, &q0) + LOG_ADD(LOG_FLOAT, qx, &q1) + LOG_ADD(LOG_FLOAT, qy, &q2) + LOG_ADD(LOG_FLOAT, qz, &q3) + LOG_ADD(LOG_FLOAT, gravityX, &gravX) + LOG_ADD(LOG_FLOAT, gravityY, &gravY) + LOG_ADD(LOG_FLOAT, gravityZ, &gravZ) + LOG_ADD(LOG_FLOAT, accZbase, &baseZacc) + LOG_ADD(LOG_UINT8, isInit, &isInit) + LOG_ADD(LOG_UINT8, isCalibrated, &isCalibrated) +LOG_GROUP_STOP(sensorfusion6) PARAM_GROUP_START(sensorfusion6) #ifdef MADWICK_QUATERNION_IMU