mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
java: Eliminated double definition of SWIGJAVA and the need for "#undefine SWIGJAVA"
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com> Conflicts: src/CMakeLists.txt
This commit is contained in:

committed by
Mihai Tudor Panu

parent
f991bcf915
commit
ef74a7b137
@ -602,7 +602,7 @@ void LSM9DS0::getMagnetometer(float *x, float *y, float *z)
|
||||
*z = (m_magZ * m_magScale) / 1000.0;
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
float *LSM9DS0::getAccelerometer()
|
||||
{
|
||||
float *v = new float[3];
|
||||
|
@ -27,19 +27,12 @@
|
||||
#include <mraa/common.hpp>
|
||||
#include <mraa/i2c.hpp>
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#undef SWIGJAVA
|
||||
#include <mraa/gpio.hpp>
|
||||
#define SWIGJAVA
|
||||
#else
|
||||
#include <mraa/gpio.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
#include "../IsrCallback.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define LSM9DS0_I2C_BUS 1
|
||||
#define LSM9DS0_DEFAULT_XM_ADDR 0x1d
|
||||
#define LSM9DS0_DEFAULT_GYRO_ADDR 0x6b
|
||||
@ -1268,7 +1261,7 @@ namespace upm {
|
||||
*/
|
||||
void getMagnetometer(float *x, float *y, float *z);
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
/**
|
||||
* get the accelerometer values in gravities
|
||||
*
|
||||
@ -1418,7 +1411,7 @@ namespace upm {
|
||||
*/
|
||||
uint8_t getInterruptGen2Src();
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
IsrCallback *cb);
|
||||
#else
|
||||
@ -1471,7 +1464,7 @@ namespace upm {
|
||||
private:
|
||||
// OR'd with a register, this enables register autoincrement mode,
|
||||
// which we need.
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(INTERRUPT_PINS_T intr, int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user