Added iOrp interface

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
This commit is contained in:
Stefan Andritoiu
2018-06-20 18:25:24 +03:00
committed by Serban Waltter
parent 69464ae93b
commit 4e61a4027e
3 changed files with 61 additions and 1 deletions

View File

@ -75,6 +75,12 @@ float DFRORP::getORP()
return dfrorp_get_orp(m_dfrorp);
}
float DFRORP::getORPValue()
{
DFRORP::update();
return DFRORP::getORP();
}
float DFRORP::getVolts()
{
return dfrorp_get_volts(m_dfrorp);

View File

@ -31,6 +31,7 @@
#include <string.h>
#include "dfrorp.h"
#include <interfaces/iOrp.hpp>
namespace upm {
/**
@ -70,7 +71,7 @@ namespace upm {
* @snippet dfrorp.cxx Interesting
*/
class DFRORP {
class DFRORP : virtual public iOrp {
public:
/**
@ -118,6 +119,14 @@ namespace upm {
*/
float getORP();
/**
* Get computed ORP (in millivolts) value from the
* sensor.
*
* @return ORP value in millivolts
*/
virtual float getORPValue();
/**
* Set the calibration offset for the device. This is
* determined by disconnecting the sensor probe (but leaving the