Files
upm/build/src/bmi160/BMI160.java

111 lines
3.3 KiB
Java

/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.4.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package upm_bmi160;
import upm_interfaces.*;
import java.util.AbstractList;
import java.lang.Float;
public class BMI160 implements iAcceleration, iGyroscope, iMagnetometer {
private long swigCPtr;
protected boolean swigCMemOwn;
public BMI160(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
public static long getCPtr(BMI160 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
javaupm_bmi160JNI.delete_BMI160(swigCPtr);
}
swigCPtr = 0;
}
}
public long iAcceleration_GetInterfaceCPtr() {
return javaupm_bmi160JNI.BMI160_iAcceleration_GetInterfaceCPtr(swigCPtr);
}
public long iGyroscope_GetInterfaceCPtr() {
return javaupm_bmi160JNI.BMI160_iGyroscope_GetInterfaceCPtr(swigCPtr);
}
public long iMagnetometer_GetInterfaceCPtr() {
return javaupm_bmi160JNI.BMI160_iMagnetometer_GetInterfaceCPtr(swigCPtr);
}
public BMI160(int bus, int address, int csPin, boolean enableMag) {
this(javaupm_bmi160JNI.new_BMI160__SWIG_0(bus, address, csPin, enableMag), true);
}
public BMI160(int bus, int address, int csPin) {
this(javaupm_bmi160JNI.new_BMI160__SWIG_1(bus, address, csPin), true);
}
public BMI160(int bus, int address) {
this(javaupm_bmi160JNI.new_BMI160__SWIG_2(bus, address), true);
}
public BMI160(int bus) {
this(javaupm_bmi160JNI.new_BMI160__SWIG_3(bus), true);
}
public BMI160() {
this(javaupm_bmi160JNI.new_BMI160__SWIG_4(), true);
}
public void update() {
javaupm_bmi160JNI.BMI160_update(swigCPtr, this);
}
public void setAccelerometerScale(BMI160_ACC_RANGE_T scale) {
javaupm_bmi160JNI.BMI160_setAccelerometerScale(swigCPtr, this, scale.swigValue());
}
public void setGyroscopeScale(BMI160_GYRO_RANGE_T scale) {
javaupm_bmi160JNI.BMI160_setGyroscopeScale(swigCPtr, this, scale.swigValue());
}
public float[] getAccelerometer() {
return javaupm_bmi160JNI.BMI160_getAccelerometer(swigCPtr, this);
}
public AbstractList<Float> getAcceleration() {
return (AbstractList<Float>)(new floatVector(javaupm_bmi160JNI.BMI160_getAcceleration(swigCPtr, this), true));
}
public AbstractList<Float> getGyroscope() {
return (AbstractList<Float>)(new floatVector(javaupm_bmi160JNI.BMI160_getGyroscope(swigCPtr, this), true));
}
public AbstractList<Float> getMagnetometer() {
return (AbstractList<Float>)(new floatVector(javaupm_bmi160JNI.BMI160_getMagnetometer(swigCPtr, this), true));
}
public void enableMagnetometer(boolean enable) {
javaupm_bmi160JNI.BMI160_enableMagnetometer(swigCPtr, this, enable);
}
public long getSensorTime() {
return javaupm_bmi160JNI.BMI160_getSensorTime(swigCPtr, this);
}
}