Updated interfaces and sensors

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Serban Waltter
2018-07-26 18:04:31 +03:00
committed by Mihai Tudor Panu
parent bfdd2c37c0
commit 90524273ec
18 changed files with 44 additions and 63 deletions

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -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
*

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -40,7 +40,7 @@ namespace upm
/**
* Measures applied pressure
*
* @return gets pressure value
* @return gets pressure value in Pa
*/
virtual float getPressure() = 0;

View File

@ -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;