java: fix Java return types in lsm9ds0

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Petre Eftime
2015-08-27 13:11:22 +03:00
committed by Mihai Tudor Panu
parent ea669ddfc6
commit 42c59e98ab
3 changed files with 74 additions and 0 deletions

View File

@ -602,6 +602,29 @@ void LSM9DS0::getMagnetometer(float *x, float *y, float *z)
*z = (m_magZ * m_magScale) / 1000.0;
}
#ifdef SWIGJAVA
float *LSM9DS0::getAccelerometer()
{
float *v = new float[3];
getAccelerometer(&v[0], &v[1], &v[2]);
return v;
}
float *LSM9DS0::getGyroscope()
{
float *v = new float[3];
getGyroscope(&v[0], &v[1], &v[2]);
return v;
}
float *LSM9DS0::getMagnetometer()
{
float *v = new float[3];
getMagnetometer(&v[0], &v[1], &v[2]);
return v;
}
#endif
float LSM9DS0::getTemperature()
{
// This might be wrong... The datasheet does not provide enough info