com.neuronrobotics.sdk.addons.kinematics.imu.IMU Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-bowler Show documentation
Show all versions of java-bowler Show documentation
A command line utility for accesing the bowler framework.
package com.neuronrobotics.sdk.addons.kinematics.imu;
import java.util.ArrayList;
public class IMU {
private ArrayList virtualListeneras = new ArrayList();
private ArrayList hardwareListeneras = new ArrayList();
private IMUUpdate virtualState=new IMUUpdate(0.0,0.0,0.0,0.0,0.0,0.0);
private IMUUpdate hardwareState=new IMUUpdate(null,null,null,null,null,null);
public void addhardwareListeners(IMUUpdateListener l){
if(!hardwareListeneras.contains(l))
hardwareListeneras.add(l);
}
public void addvirtualListeners(IMUUpdateListener l){
if(!virtualListeneras.contains(l))
virtualListeneras.add(l);
}
public void removehardwareListeners(IMUUpdateListener l){
if(hardwareListeneras.contains(l))
hardwareListeneras.remove(l);
}
public void removevirtualListeners(IMUUpdateListener l){
if(virtualListeneras.contains(l))
virtualListeneras.remove(l);
}
public void clearhardwareListeners(){
hardwareListeneras.clear();;
}
public void clearvirtualListeners(){
virtualListeneras.clear();
}
public IMUUpdate getVirtualState() {
return virtualState;
}
public void setVirtualState(IMUUpdate virtualState) {
this.virtualState = virtualState;
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy