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,7 @@
#include <iostream>
#include <string>
#include <mraa/aio.h>
#include <interfaces/iDistance.hpp>
// EZ series is volts/512
#define MAXSONAREZ_RES 512
@@ -67,7 +68,7 @@ namespace upm {
* @snippet maxsonarez.cxx Interesting
*/
class MAXSONAREZ {
class MAXSONAREZ : virtual public iDistance {
public:
/**
@@ -90,6 +91,13 @@ namespace upm {
*/
int inches();
/**
* Gets the distance to the object in inches
*
* @return Distance to the object in inches
*/
virtual int getDistance();
private:
mraa_aio_context m_aio;
float m_aref;