mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 19:31:15 +03:00
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:

committed by
Mihai Tudor Panu

parent
ea669ddfc6
commit
42c59e98ab
@ -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
|
||||
|
Reference in New Issue
Block a user