mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-bmi088.git
synced 2025-06-10 18:45:59 +00:00
Zero initialized sensor data in mock driver
This commit is contained in:
parent
879859c6c9
commit
03951ce8cc
@ -45,7 +45,7 @@ namespace sta
|
|||||||
|
|
||||||
void BMI088::getRotation(float* x, float* y, float* z)
|
void BMI088::getRotation(float* x, float* y, float* z)
|
||||||
{
|
{
|
||||||
float omegas[3];
|
float omegas[3] = {0.0f, 0.0f, 0.0f};
|
||||||
spatz::request(STA_BMI088_GYRO_SPATZ_ID, omegas, 3);
|
spatz::request(STA_BMI088_GYRO_SPATZ_ID, omegas, 3);
|
||||||
|
|
||||||
*x = omegas[0];
|
*x = omegas[0];
|
||||||
@ -71,7 +71,7 @@ namespace sta
|
|||||||
|
|
||||||
void BMI088::getAcceleration(float* x, float* y, float* z)
|
void BMI088::getAcceleration(float* x, float* y, float* z)
|
||||||
{
|
{
|
||||||
float acc[3];
|
float acc[3] = {0.0f, 0.0f, 0.0f};
|
||||||
spatz::request(STA_BMI088_ACC_SPATZ_ID, acc, 3);
|
spatz::request(STA_BMI088_ACC_SPATZ_ID, acc, 3);
|
||||||
|
|
||||||
*x = acc[0];
|
*x = acc[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user