mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Added initial interfaces and some sensors implementing them
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
6bf21a23e7
commit
f035470822
@ -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]
|
||||
|
Reference in New Issue
Block a user