java: fix Java return types in MMA7660
Signed-off-by: Petre <petre.p.eftime@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
@@ -88,6 +88,15 @@ void MMA7660::getRawValues(int *x, int *y, int *z)
|
||||
*z = getVerifiedAxis(REG_ZOUT);
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
int *MMA7660::getRawValues()
|
||||
{
|
||||
int *values = new int[3];
|
||||
getRawValues(&values[0], &values[1], &values[2]);
|
||||
return values;
|
||||
}
|
||||
#endif
|
||||
|
||||
void MMA7660::setModeActive()
|
||||
{
|
||||
uint8_t modeReg = readByte(REG_MODE);
|
||||
@@ -254,3 +263,12 @@ void MMA7660::getAcceleration(float *ax, float *ay, float *az)
|
||||
*az = z/21.33;
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
float *MMA7660::getAcceleration()
|
||||
{
|
||||
float *values = new float[3];
|
||||
getAcceleration(&values[0], &values[1], &values[2]);
|
||||
return values;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user