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

@ -47,3 +47,8 @@ int MB704X::getRange()
{
return mb704x_get_range(m_mb704x);
}
int MB704X::getDistance()
{
return getRange();
}

View File

@ -25,6 +25,7 @@
#include <string>
#include <iostream>
#include <interfaces/iDistance.hpp>
#include <stdlib.h>
#include <unistd.h>
@ -58,7 +59,7 @@ namespace upm {
* @snippet mb704x.cxx Interesting
*/
class MB704X {
class MB704X : virtual public iDistance {
public:
/**
@ -84,7 +85,12 @@ namespace upm {
*/
int getRange();
/**
* Gets the distance to the object in cm
*
* @return Distance to the object in cm
*/
virtual int getDistance();
protected:
// mb704x device context
mb704x_context m_mb704x;