From 59976d55d5cb99874d09c108fb5df82c1ac8aa69 Mon Sep 17 00:00:00 2001 From: jkerpe Date: Mon, 23 Oct 2023 14:55:56 +0200 Subject: [PATCH] Updated some comments --- lib/HALTarget/IMU.h | 20 ++++++++------------ lib/HALTest/Board.h | 2 +- lib/HALTest/IMU.h | 19 ++++++++----------- lib/SensorFusion/App.cpp | 6 +++--- 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/lib/HALTarget/IMU.h b/lib/HALTarget/IMU.h index 481cc4c0..4baa334b 100644 --- a/lib/HALTarget/IMU.h +++ b/lib/HALTarget/IMU.h @@ -92,29 +92,25 @@ class IMU : public IIMU */ void calibrate() final; - /** - * Get last Accelerometer values. + * Get last Accelerometer values in mm/s/s. * - * @return Accelerometer values - */ - // + * @return Accelerometer values [acceleration_x, acceleration_y] + */ const int16_t* getAccelerationValues() final; /** - * Get last Gyro values. + * Get last Gyroscope values in mrad per second. * - * @return Gyro values - */ - // + * @return Gyroscope values + */ const int16_t getTurnRate() final; /** - * Get last Magnetometer values. + * Get last Magnetometer values in mrad. * * @return Magnetometer values - */ - // + */ const int16_t getMagnetometerAngle() final; /** diff --git a/lib/HALTest/Board.h b/lib/HALTest/Board.h index 493c4a2c..9e3cf759 100644 --- a/lib/HALTest/Board.h +++ b/lib/HALTest/Board.h @@ -251,7 +251,7 @@ class Board : public IBoard /** Red LED driver */ LedGreen m_ledGreen; - /** Proximity sensors */ + /** IMU driver */ IMU m_imu; /** diff --git a/lib/HALTest/IMU.h b/lib/HALTest/IMU.h index f7d91d69..f80be51b 100644 --- a/lib/HALTest/IMU.h +++ b/lib/HALTest/IMU.h @@ -77,33 +77,30 @@ class IMU : public IIMU } /** - * Get last Accelerometer values. + * Get last Accelerometer values in mm/s/s. * - * @return Accelerometer values - */ - // + * @return Accelerometer values [acceleration_x, acceleration_y] + */ const int16_t* getAccelerationValues() final { return m_accelerationValues; } /** - * Get last Gyro values. + * Get last Gyroscope values in mrad per second. * - * @return Gyro values - */ - // + * @return Gyroscope values + */ const int16_t getTurnRate() final { return 0; } /** - * Get last Magnetometer values. + * Get last Magnetometer values in mrad. * * @return Magnetometer values - */ - // + */ const int16_t getMagnetometerAngle() final { return 0; diff --git a/lib/SensorFusion/App.cpp b/lib/SensorFusion/App.cpp index aadc6cf4..5923f6f5 100644 --- a/lib/SensorFusion/App.cpp +++ b/lib/SensorFusion/App.cpp @@ -151,9 +151,9 @@ void App::sendSensorData() const Util::int16ToByteArray(&payload[1 * sizeof(int16_t)], sizeof(int16_t), accelerationValues[1]); Util::int16ToByteArray(&payload[2 * sizeof(int16_t)], sizeof(int16_t), turnRate); Util::int16ToByteArray(&payload[3 * sizeof(int16_t)], sizeof(int16_t), orientationMagnetometer); - Util::int16ToByteArray(&payload[4 * sizeof(int16_t)], sizeof(int16_t), orientationOdometry); - Util::int16ToByteArray(&payload[5 * sizeof(int16_t)], sizeof(int16_t), positionXOdometry); - Util::int16ToByteArray(&payload[6 * sizeof(int16_t)], sizeof(int16_t), positionYOdometry); + Util::int16ToByteArray(&payload[4 * sizeof(int16_t)], sizeof(int16_t), orientationOdometryInt16); + Util::int16ToByteArray(&payload[5 * sizeof(int16_t)], sizeof(int16_t), positionXOdometryInt16); + Util::int16ToByteArray(&payload[6 * sizeof(int16_t)], sizeof(int16_t), positionYOdometryInt16); (void)m_smpServer.sendData(m_smpChannelIdSensorData, payload, sizeof(payload)); }