mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 18:01:18 +03:00
SWIGJAVA: Remove the last JAVA ifdefs from src
Removed all references to #ifdef SWIGJAVA and JAVACALLBACK from the library source. All java-specific source code has been moved to the corresponding library's .i file for java. * Update library source * Update examples where necessary * The function pointer methodology has been remove from libraries which provided callbacks as both a class and a function pointer implementation. Examples were updated to use the class version of callbacks. * Updated documentation for SWIGJAVA Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -28,15 +28,14 @@ public class MMA7455Sample {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_mma7455.MMA7455 sensor = new upm_mma7455.MMA7455(0);
|
||||
short[] val;
|
||||
|
||||
while (true) {
|
||||
val = sensor.readData();
|
||||
System.out.println("Accelerometer X: " + val[0] + ", Y: " + val[1] + ", Z: " + val[2]);
|
||||
upm_mma7455.ShortVector val = sensor.readData();
|
||||
System.out.println("Accelerometer X: " + val.get(0) + ", Y: " + val.get(1) + ", Z: " + val.get(2));
|
||||
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
// ! [Interesting]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user