Added iGas interface

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-10-08 16:43:42 +03:00
committed by Mihai Tudor Panu
parent f28a6d2561
commit e4f106a0c7
33 changed files with 267 additions and 21 deletions

View File

@@ -25,6 +25,7 @@
#include <string>
#include <mraa/aio.h>
#include <interfaces/iGas.hpp>
namespace upm {
/**
@@ -50,7 +51,7 @@ namespace upm {
* @image html groveo2.jpg
* @snippet groveo2.cxx Interesting
*/
class GroveO2 {
class GroveO2: virtual public iGas {
public:
/**
* Grove O2 Oxygen Gas sensor constructor
@@ -69,6 +70,13 @@ namespace upm {
*/
float voltageValue();
/**
* Measures O2 from the sensor
*
* @return Oxygen concentration as PPM
*/
float getConcentration();
private:
mraa_aio_context m_aio;
};