mirror of
https://github.com/eclipse/upm.git
synced 2025-12-16 13:54:40 +03:00
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:
committed by
Mihai Tudor Panu
parent
f28a6d2561
commit
e4f106a0c7
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user