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

@ -59,6 +59,11 @@ float BH1750::getLux()
return lux;
}
float BH1750::getLuminance()
{
return getLux();
}
void BH1750::powerUp()
{
if (bh1750_power_up(m_bh1750) != UPM_SUCCESS)

View File

@ -29,6 +29,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <interfaces/iLight.hpp>
#include "bh1750.h"
@ -57,7 +58,7 @@ namespace upm {
* @snippet bh1750.cxx Interesting
*/
class BH1750 {
class BH1750 : virtual public iLight {
public:
/**
@ -92,6 +93,13 @@ namespace upm {
*/
float getLux();
/**
* Gets the luminance value from the sensor
*
* @return The measured light intensity value in Lux
*/
virtual float getLuminance();
/**
* Power up the device.
*/