java: fix Java return types in ADXL355
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:
@@ -72,6 +72,15 @@ void ADXL335::values(int *xVal, int *yVal, int *zVal)
|
||||
*zVal = mraa_aio_read(m_aioZ);
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
int *ADXL335::values()
|
||||
{
|
||||
int *v = new int[3];
|
||||
values(&v[0], &v[1], &v[2]);
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ADXL335::acceleration(float *xAccel, float *yAccel, float *zAccel)
|
||||
{
|
||||
int x, y, z;
|
||||
@@ -87,6 +96,15 @@ void ADXL335::acceleration(float *xAccel, float *yAccel, float *zAccel)
|
||||
*zAccel = (zVolts - m_zeroZ) / ADXL335_SENSITIVITY;
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
float *ADXL335::acceleration()
|
||||
{
|
||||
float *v = new float[3];
|
||||
acceleration(&v[0], &v[1], &v[2]);
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ADXL335::calibrate()
|
||||
{
|
||||
// make sure the sensor is still before running calibration.
|
||||
|
||||
Reference in New Issue
Block a user