Added initial interfaces and some sensors implementing them

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Stefanescu
2018-06-12 18:46:49 +03:00
committed by Mihai Tudor Panu
parent 6bf21a23e7
commit f035470822
102 changed files with 1183 additions and 182 deletions

View File

@ -26,6 +26,8 @@
#include <string>
#include <mraa/i2c.h>
#include <math.h>
#include <interfaces/iHumidity.hpp>
#include <interfaces/iTemperature.hpp>
#define AM2315_NAME "am2315"
#define AM2315_I2C_ADDRESS 0x5c
@ -77,7 +79,7 @@ namespace upm {
* @image html am2315.jpeg
* @snippet am2315.cxx Interesting
*/
class AM2315 {
class AM2315 : virtual public iHumidity, virtual public iTemperature {
public:
/**
* Instantiates an AM2315 object
@ -98,15 +100,17 @@ class AM2315 {
* Data is updated every 2 seconds - accesses occurring more often than
* that return cached data
*/
float getHumidity(void);
virtual float getHumidity(void);
/**
* Gets the humidity cell temperature [degC]
*
* Data is updated every 2 seconds - accesses occurring more often than
* that return cached data
*
* @return float compensated temperature value
*/
float getTemperature(void);
virtual float getTemperature(void);
/**
* Gets the humidity cell temperature [degF]