All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.neuronrobotics.sdk.addons.kinematics.imu.IMU Maven / Gradle / Ivy

There is a newer version: 3.28.0
Show newest version
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