From 5329e6374262e5ea6839bf1774c881c8880ec62f Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Mon, 3 Aug 2015 16:22:41 -0300 Subject: [PATCH] AP_InertialSensor: allow publishing sample rate to frontend That information will be used for a "centralized" vibration calculation. --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 1 + libraries/AP_InertialSensor/AP_InertialSensor.h | 3 +++ libraries/AP_InertialSensor/AP_InertialSensor_Backend.cpp | 6 ++++++ libraries/AP_InertialSensor/AP_InertialSensor_Backend.h | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 2a1dbf394e..f847b1411b 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -344,6 +344,7 @@ AP_InertialSensor::AP_InertialSensor() : #endif _accel_max_abs_offsets[i] = 3.5f; + _accel_sample_rates[i] = 0; } #if INS_VIBRATION_CHECK for (uint8_t i=0; i