Added iMagnetometer interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
aa966946d5
commit
f28a6d2561
@@ -101,13 +101,13 @@ std::vector<float> BMI160::getGyroscope()
|
||||
return std::vector<float>(values, values + 3);
|
||||
}
|
||||
|
||||
float *BMI160::getMagnetometer()
|
||||
std::vector<float> BMI160::getMagnetometer()
|
||||
{
|
||||
static float values[3]; // x, y, and then z
|
||||
|
||||
getMagnetometer(&values[0], &values[1], &values[2]);
|
||||
|
||||
return values;
|
||||
return std::vector<float>(values, values + 3);
|
||||
}
|
||||
|
||||
void BMI160::enableMagnetometer(bool enable)
|
||||
|
||||
Reference in New Issue
Block a user