mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Updated interfaces and sensors
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
This commit is contained in:
@ -29,16 +29,16 @@ namespace upm
|
||||
/**
|
||||
* @brief Interface for Rotary Angle sensors
|
||||
*/
|
||||
class iRotaryAngle
|
||||
class iAngle
|
||||
{
|
||||
public:
|
||||
virtual ~iRotaryAngle() {}
|
||||
virtual ~iAngle() {}
|
||||
|
||||
/**
|
||||
* Get rotation value from sensor data.
|
||||
*
|
||||
* @return rotation value.
|
||||
* @return rotation value in degrees.
|
||||
*/
|
||||
virtual float getValue() = 0;
|
||||
virtual float getAngle() = 0;
|
||||
};
|
||||
}
|
@ -35,18 +35,10 @@ namespace upm
|
||||
virtual ~iClock() {}
|
||||
|
||||
/**
|
||||
* Loads all the time values
|
||||
* Returns the time since epoch in seconds
|
||||
*
|
||||
* @return True if time data loaded successfully
|
||||
* @return time since epoch in seconds
|
||||
*/
|
||||
virtual bool loadTime() = 0;
|
||||
|
||||
/**
|
||||
* Sets the time. You should call loadTime() beforehand to
|
||||
* maintain consistency
|
||||
*
|
||||
* @return True if time is set successfully
|
||||
*/
|
||||
virtual bool setTime() = 0;
|
||||
virtual unsigned long getTime() = 0;
|
||||
};
|
||||
}
|
||||
|
@ -34,18 +34,6 @@ namespace upm
|
||||
public:
|
||||
virtual ~iEmg() {}
|
||||
|
||||
/**
|
||||
* Calibrates the EMG reader
|
||||
*/
|
||||
virtual void calibrate() = 0;
|
||||
|
||||
/**
|
||||
* Measures muscle signals from the reader
|
||||
*
|
||||
* @return Muscle output as analog voltage
|
||||
*/
|
||||
virtual int value() = 0;
|
||||
|
||||
/**
|
||||
* Read scaled/offset voltage from the sensor
|
||||
*
|
||||
|
@ -40,13 +40,5 @@ namespace upm
|
||||
* @param enable true to enable the device, false otherwise.
|
||||
*/
|
||||
virtual void enable(bool enable) = 0;
|
||||
|
||||
/**
|
||||
* Set the baudrate of the device.
|
||||
*
|
||||
* @param baudrate The baud rate to set for the device.
|
||||
*/
|
||||
virtual void setBaudrate(unsigned int baudrate) = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -35,13 +35,11 @@ namespace upm
|
||||
virtual ~iPH() {}
|
||||
|
||||
/**
|
||||
* Take a number of samples and return the detected pH value. The
|
||||
* default number of samples is 15.
|
||||
* Returns the detected pH value.
|
||||
*
|
||||
* @param samples The number of samples to average over, default 15
|
||||
* @return The pH value detected
|
||||
*/
|
||||
virtual float pH(unsigned int samples = 15) = 0;
|
||||
virtual float getPH() = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace upm
|
||||
/**
|
||||
* Measures applied pressure
|
||||
*
|
||||
* @return gets pressure value
|
||||
* @return gets pressure value in Pa
|
||||
*/
|
||||
virtual float getPressure() = 0;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace upm
|
||||
/**
|
||||
* Gets the conversion value from the sensor
|
||||
*
|
||||
* @return ADC conversion value
|
||||
* @return ADC conversion value in volts
|
||||
*/
|
||||
virtual unsigned int getValue() = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user