Added interfaces iEC,iEmg,iClock,iHeartRate,iLineFinder

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
This commit is contained in:
Stefan Andritoiu
2018-06-20 18:24:26 +03:00
committed by Serban Waltter
parent e7820f2831
commit 69464ae93b
22 changed files with 368 additions and 59 deletions

View File

@ -73,6 +73,12 @@ float DFREC::getEC()
return dfrec_get_ec(m_dfrec);
}
float DFREC::getECValue()
{
DFREC::update();
return DFREC::getEC();
}
float DFREC::getVolts()
{
return dfrec_get_volts(m_dfrec);

View File

@ -31,6 +31,7 @@
#include <string.h>
#include "dfrec.h"
#include <interfaces/iEC.hpp>
namespace upm {
/**
@ -65,7 +66,7 @@ namespace upm {
* @snippet dfrec.cxx Interesting
*/
class DFREC {
class DFREC : virtual public iEC {
public:
/**
@ -120,6 +121,13 @@ namespace upm {
*/
float getEC();
/**
* Get computed EC (ms/cm) value from the sensor. update() is called
* in this function.
* @return EC value in ms/cm.
*/
virtual float getECValue();
/**
* Get the measured volts from the sensor. update() must have been
* called prior to calling this function.