Android Open Source - Sensors2OSC Sensor Configuration






From Project

Back to project page Sensors2OSC.

License

The source code is released under:

Author: Thomas Mayer <thomas@residuum.org> Antonio Deusany de Carvalho Junior Copyright (c) 2014 Thomas Mayer, Antonio Deusany de Carvalho Junior Permission is hereby granted, free of charge, to any...

If you think the Android project Sensors2OSC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.sensors2.osc.communication;
/*from   ww  w. j  a  v  a2  s .co  m*/
/**
 * Created by thomas on 11.11.14.
 */
public class SensorConfiguration {
  private boolean send;
  private int index;
  private int sensorType;
  private String oscParam;
  private float currentValue;

  public SensorConfiguration() {
  }

  public boolean sendingNeeded(float value) {
    if (!this.send) {
      return false;
    }
    if (Math.abs(value - this.currentValue) != 0){
      return  false;
    }
    this.currentValue = value;
    return true;
  }

  public void setSend(boolean send) {
    this.send = send;
  }

  public int getIndex() {
    return this.index;
  }

  public int getSensorType() {
    return this.sensorType;
  }

  public String getOscParam() {
    return this.oscParam;
  }

  public void setOscParam(String oscParam) {
    this.oscParam = oscParam;
  }

  public void setSensorType(int sensorType) {
    this.sensorType = sensorType;
  }

  public void setIndex(int index) {
    this.index = index;
  }
}




Java Source Code List

org.sensors2.osc.ApplicationTest.java
org.sensors2.osc.activities.AboutActivity.java
org.sensors2.osc.activities.SettingsActivity.java
org.sensors2.osc.activities.StartUpActivity.java
org.sensors2.osc.communication.OscCommunication.java
org.sensors2.osc.communication.OscConfiguration.java
org.sensors2.osc.communication.OscDispatcher.java
org.sensors2.osc.communication.SensorConfiguration.java
org.sensors2.osc.fragments.SensorFragment.java
org.sensors2.osc.fragments.SensorGroupFragment.java
org.sensors2.osc.sensors.Parameters.java
org.sensors2.osc.sensors.Settings.java