mirror of
https://github.com/eclipse/upm.git
synced 2025-07-03 10:21:19 +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
@ -28,6 +28,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <mraa/aio.hpp>
|
||||
#include <interfaces/iLight.hpp>
|
||||
#include "grovebase.hpp"
|
||||
|
||||
namespace upm {
|
||||
@ -54,7 +55,7 @@ namespace upm {
|
||||
* @image html grovelight.jpg
|
||||
* @snippet grove-grovelight.cxx Interesting
|
||||
*/
|
||||
class GroveLight: public Grove {
|
||||
class GroveLight: public Grove, virtual public iLight {
|
||||
public:
|
||||
/**
|
||||
* Grove analog light sensor constructor
|
||||
@ -78,6 +79,13 @@ class GroveLight: public Grove {
|
||||
* @return Normalized light reading in lux
|
||||
*/
|
||||
int value();
|
||||
|
||||
/**
|
||||
* Gets an approximate light value, in lux, from the sensor
|
||||
*
|
||||
* @return Normalized light reading in lux
|
||||
*/
|
||||
virtual float getLuminance();
|
||||
private:
|
||||
mraa_aio_context m_aio;
|
||||
};
|
||||
|
Reference in New Issue
Block a user